aidevops 2.52.1 → 2.53.1
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 +1 -1
- package/VERSION +1 -1
- package/aidevops.sh +15 -9
- package/package.json +4 -4
- package/scripts/npm-postinstall.js +6 -7
- package/setup.sh +1 -1
- package/templates/deploy-templates.sh +144 -0
- package/templates/home/.agent/README.md +33 -0
- package/templates/home/AGENTS.md +96 -0
- package/templates/home/git/.agent/README.md +48 -0
- package/templates/home/git/AGENTS.md +97 -0
- package/templates/standard-functions.sh +179 -0
- package/templates/wordpress-performance-workflow.md +217 -0
- package/.agent/AGENTS.md +0 -614
- package/.agent/accounts.md +0 -65
- package/.agent/aidevops/add-new-mcp-to-aidevops.md +0 -456
- package/.agent/aidevops/api-integrations.md +0 -335
- package/.agent/aidevops/architecture.md +0 -510
- package/.agent/aidevops/configs.md +0 -274
- package/.agent/aidevops/docs.md +0 -244
- package/.agent/aidevops/extension.md +0 -311
- package/.agent/aidevops/mcp-integrations.md +0 -340
- package/.agent/aidevops/mcp-troubleshooting.md +0 -162
- package/.agent/aidevops/memory-patterns.md +0 -172
- package/.agent/aidevops/providers.md +0 -217
- package/.agent/aidevops/recommendations.md +0 -321
- package/.agent/aidevops/requirements.md +0 -301
- package/.agent/aidevops/resources.md +0 -214
- package/.agent/aidevops/security-requirements.md +0 -174
- package/.agent/aidevops/security.md +0 -350
- package/.agent/aidevops/service-links.md +0 -400
- package/.agent/aidevops/services.md +0 -357
- package/.agent/aidevops/setup.md +0 -153
- package/.agent/aidevops/troubleshooting.md +0 -389
- package/.agent/aidevops.md +0 -124
- package/.agent/build-plus.md +0 -244
- package/.agent/content/guidelines.md +0 -109
- package/.agent/content.md +0 -87
- package/.agent/health.md +0 -59
- package/.agent/legal.md +0 -59
- package/.agent/loop-state/full-loop.local.md +0 -16
- package/.agent/loop-state/ralph-loop.local.md +0 -10
- package/.agent/marketing.md +0 -440
- package/.agent/memory/README.md +0 -260
- package/.agent/onboarding.md +0 -796
- package/.agent/plan-plus.md +0 -245
- package/.agent/research.md +0 -100
- package/.agent/sales.md +0 -333
- package/.agent/scripts/101domains-helper.sh +0 -701
- package/.agent/scripts/add-missing-returns.sh +0 -140
- package/.agent/scripts/agent-browser-helper.sh +0 -311
- package/.agent/scripts/agno-setup.sh +0 -712
- package/.agent/scripts/ahrefs-mcp-wrapper.js +0 -168
- package/.agent/scripts/aidevops-update-check.sh +0 -71
- package/.agent/scripts/ampcode-cli.sh +0 -522
- package/.agent/scripts/auto-version-bump.sh +0 -156
- package/.agent/scripts/autogen-helper.sh +0 -512
- package/.agent/scripts/beads-sync-helper.sh +0 -596
- package/.agent/scripts/closte-helper.sh +0 -5
- package/.agent/scripts/cloudron-helper.sh +0 -321
- package/.agent/scripts/codacy-cli-chunked.sh +0 -581
- package/.agent/scripts/codacy-cli.sh +0 -442
- package/.agent/scripts/code-audit-helper.sh +0 -5
- package/.agent/scripts/coderabbit-cli.sh +0 -417
- package/.agent/scripts/coderabbit-pro-analysis.sh +0 -238
- package/.agent/scripts/commands/code-simplifier.md +0 -86
- package/.agent/scripts/commands/full-loop.md +0 -246
- package/.agent/scripts/commands/postflight-loop.md +0 -103
- package/.agent/scripts/commands/recall.md +0 -182
- package/.agent/scripts/commands/remember.md +0 -132
- package/.agent/scripts/commands/save-todo.md +0 -175
- package/.agent/scripts/commands/session-review.md +0 -154
- package/.agent/scripts/comprehensive-quality-fix.sh +0 -106
- package/.agent/scripts/context-builder-helper.sh +0 -522
- package/.agent/scripts/coolify-cli-helper.sh +0 -674
- package/.agent/scripts/coolify-helper.sh +0 -380
- package/.agent/scripts/crawl4ai-examples.sh +0 -401
- package/.agent/scripts/crawl4ai-helper.sh +0 -1078
- package/.agent/scripts/crewai-helper.sh +0 -681
- package/.agent/scripts/dev-browser-helper.sh +0 -513
- package/.agent/scripts/dns-helper.sh +0 -396
- package/.agent/scripts/domain-research-helper.sh +0 -917
- package/.agent/scripts/dspy-helper.sh +0 -285
- package/.agent/scripts/dspyground-helper.sh +0 -291
- package/.agent/scripts/eeat-score-helper.sh +0 -1242
- package/.agent/scripts/efficient-return-fix.sh +0 -92
- package/.agent/scripts/extract-opencode-prompts.sh +0 -128
- package/.agent/scripts/find-missing-returns.sh +0 -113
- package/.agent/scripts/fix-auth-headers.sh +0 -104
- package/.agent/scripts/fix-common-strings.sh +0 -254
- package/.agent/scripts/fix-content-type.sh +0 -100
- package/.agent/scripts/fix-error-messages.sh +0 -130
- package/.agent/scripts/fix-misplaced-returns.sh +0 -74
- package/.agent/scripts/fix-remaining-literals.sh +0 -152
- package/.agent/scripts/fix-return-statements.sh +0 -41
- package/.agent/scripts/fix-s131-default-cases.sh +0 -249
- package/.agent/scripts/fix-sc2155-simple.sh +0 -102
- package/.agent/scripts/fix-shellcheck-critical.sh +0 -187
- package/.agent/scripts/fix-string-literals.sh +0 -273
- package/.agent/scripts/full-loop-helper.sh +0 -773
- package/.agent/scripts/generate-opencode-agents.sh +0 -497
- package/.agent/scripts/generate-opencode-commands.sh +0 -1629
- package/.agent/scripts/generate-skills.sh +0 -366
- package/.agent/scripts/git-platforms-helper.sh +0 -640
- package/.agent/scripts/gitea-cli-helper.sh +0 -743
- package/.agent/scripts/github-cli-helper.sh +0 -702
- package/.agent/scripts/gitlab-cli-helper.sh +0 -682
- package/.agent/scripts/gsc-add-user-helper.sh +0 -325
- package/.agent/scripts/gsc-sitemap-helper.sh +0 -678
- package/.agent/scripts/hetzner-helper.sh +0 -485
- package/.agent/scripts/hostinger-helper.sh +0 -229
- package/.agent/scripts/keyword-research-helper.sh +0 -1815
- package/.agent/scripts/langflow-helper.sh +0 -544
- package/.agent/scripts/linkedin-automation.py +0 -241
- package/.agent/scripts/linter-manager.sh +0 -599
- package/.agent/scripts/linters-local.sh +0 -434
- package/.agent/scripts/list-keys-helper.sh +0 -488
- package/.agent/scripts/local-browser-automation.py +0 -339
- package/.agent/scripts/localhost-helper.sh +0 -744
- package/.agent/scripts/loop-common.sh +0 -806
- package/.agent/scripts/mainwp-helper.sh +0 -728
- package/.agent/scripts/markdown-formatter.sh +0 -338
- package/.agent/scripts/markdown-lint-fix.sh +0 -311
- package/.agent/scripts/mass-fix-returns.sh +0 -58
- package/.agent/scripts/mcp-diagnose.sh +0 -167
- package/.agent/scripts/mcp-inspector-helper.sh +0 -449
- package/.agent/scripts/memory-helper.sh +0 -650
- package/.agent/scripts/monitor-code-review.sh +0 -255
- package/.agent/scripts/onboarding-helper.sh +0 -706
- package/.agent/scripts/opencode-github-setup-helper.sh +0 -797
- package/.agent/scripts/opencode-test-helper.sh +0 -213
- package/.agent/scripts/pagespeed-helper.sh +0 -464
- package/.agent/scripts/pandoc-helper.sh +0 -362
- package/.agent/scripts/postflight-check.sh +0 -555
- package/.agent/scripts/pre-commit-hook.sh +0 -259
- package/.agent/scripts/pre-edit-check.sh +0 -169
- package/.agent/scripts/qlty-cli.sh +0 -356
- package/.agent/scripts/quality-cli-manager.sh +0 -525
- package/.agent/scripts/quality-feedback-helper.sh +0 -462
- package/.agent/scripts/quality-fix.sh +0 -263
- package/.agent/scripts/quality-loop-helper.sh +0 -1108
- package/.agent/scripts/ralph-loop-helper.sh +0 -836
- package/.agent/scripts/ralph-upstream-check.sh +0 -341
- package/.agent/scripts/secretlint-helper.sh +0 -847
- package/.agent/scripts/servers-helper.sh +0 -241
- package/.agent/scripts/ses-helper.sh +0 -619
- package/.agent/scripts/session-review-helper.sh +0 -404
- package/.agent/scripts/setup-linters-wizard.sh +0 -379
- package/.agent/scripts/setup-local-api-keys.sh +0 -330
- package/.agent/scripts/setup-mcp-integrations.sh +0 -472
- package/.agent/scripts/shared-constants.sh +0 -246
- package/.agent/scripts/site-crawler-helper.sh +0 -1487
- package/.agent/scripts/snyk-helper.sh +0 -940
- package/.agent/scripts/sonarcloud-autofix.sh +0 -193
- package/.agent/scripts/sonarcloud-cli.sh +0 -191
- package/.agent/scripts/sonarscanner-cli.sh +0 -455
- package/.agent/scripts/spaceship-helper.sh +0 -747
- package/.agent/scripts/stagehand-helper.sh +0 -321
- package/.agent/scripts/stagehand-python-helper.sh +0 -321
- package/.agent/scripts/stagehand-python-setup.sh +0 -441
- package/.agent/scripts/stagehand-setup.sh +0 -439
- package/.agent/scripts/system-cleanup.sh +0 -340
- package/.agent/scripts/terminal-title-helper.sh +0 -388
- package/.agent/scripts/terminal-title-setup.sh +0 -549
- package/.agent/scripts/test-stagehand-both-integration.sh +0 -317
- package/.agent/scripts/test-stagehand-integration.sh +0 -309
- package/.agent/scripts/test-stagehand-python-integration.sh +0 -341
- package/.agent/scripts/todo-ready.sh +0 -263
- package/.agent/scripts/tool-version-check.sh +0 -362
- package/.agent/scripts/toon-helper.sh +0 -469
- package/.agent/scripts/twilio-helper.sh +0 -917
- package/.agent/scripts/updown-helper.sh +0 -279
- package/.agent/scripts/validate-mcp-integrations.sh +0 -250
- package/.agent/scripts/validate-version-consistency.sh +0 -131
- package/.agent/scripts/vaultwarden-helper.sh +0 -597
- package/.agent/scripts/vercel-cli-helper.sh +0 -816
- package/.agent/scripts/verify-mirrors.sh +0 -169
- package/.agent/scripts/version-manager.sh +0 -831
- package/.agent/scripts/webhosting-helper.sh +0 -471
- package/.agent/scripts/webhosting-verify.sh +0 -238
- package/.agent/scripts/wordpress-mcp-helper.sh +0 -508
- package/.agent/scripts/worktree-helper.sh +0 -595
- package/.agent/scripts/worktree-sessions.sh +0 -577
- package/.agent/seo/dataforseo.md +0 -215
- package/.agent/seo/domain-research.md +0 -532
- package/.agent/seo/eeat-score.md +0 -659
- package/.agent/seo/google-search-console.md +0 -366
- package/.agent/seo/gsc-sitemaps.md +0 -282
- package/.agent/seo/keyword-research.md +0 -521
- package/.agent/seo/serper.md +0 -278
- package/.agent/seo/site-crawler.md +0 -387
- package/.agent/seo.md +0 -236
- package/.agent/services/accounting/quickfile.md +0 -159
- package/.agent/services/communications/telfon.md +0 -470
- package/.agent/services/communications/twilio.md +0 -569
- package/.agent/services/crm/fluentcrm.md +0 -449
- package/.agent/services/email/ses.md +0 -399
- package/.agent/services/hosting/101domains.md +0 -378
- package/.agent/services/hosting/closte.md +0 -177
- package/.agent/services/hosting/cloudflare.md +0 -251
- package/.agent/services/hosting/cloudron.md +0 -478
- package/.agent/services/hosting/dns-providers.md +0 -335
- package/.agent/services/hosting/domain-purchasing.md +0 -344
- package/.agent/services/hosting/hetzner.md +0 -327
- package/.agent/services/hosting/hostinger.md +0 -287
- package/.agent/services/hosting/localhost.md +0 -419
- package/.agent/services/hosting/spaceship.md +0 -353
- package/.agent/services/hosting/webhosting.md +0 -330
- package/.agent/social-media.md +0 -69
- package/.agent/templates/plans-template.md +0 -114
- package/.agent/templates/prd-template.md +0 -129
- package/.agent/templates/tasks-template.md +0 -108
- package/.agent/templates/todo-template.md +0 -89
- package/.agent/tools/ai-assistants/agno.md +0 -471
- package/.agent/tools/ai-assistants/capsolver.md +0 -326
- package/.agent/tools/ai-assistants/configuration.md +0 -221
- package/.agent/tools/ai-assistants/overview.md +0 -209
- package/.agent/tools/ai-assistants/status.md +0 -171
- package/.agent/tools/ai-assistants/windsurf.md +0 -193
- package/.agent/tools/ai-orchestration/autogen.md +0 -406
- package/.agent/tools/ai-orchestration/crewai.md +0 -445
- package/.agent/tools/ai-orchestration/langflow.md +0 -405
- package/.agent/tools/ai-orchestration/openprose.md +0 -487
- package/.agent/tools/ai-orchestration/overview.md +0 -362
- package/.agent/tools/ai-orchestration/packaging.md +0 -647
- package/.agent/tools/browser/agent-browser.md +0 -464
- package/.agent/tools/browser/browser-automation.md +0 -400
- package/.agent/tools/browser/chrome-devtools.md +0 -282
- package/.agent/tools/browser/crawl4ai-integration.md +0 -422
- package/.agent/tools/browser/crawl4ai-resources.md +0 -277
- package/.agent/tools/browser/crawl4ai-usage.md +0 -416
- package/.agent/tools/browser/crawl4ai.md +0 -585
- package/.agent/tools/browser/dev-browser.md +0 -341
- package/.agent/tools/browser/pagespeed.md +0 -260
- package/.agent/tools/browser/playwright.md +0 -266
- package/.agent/tools/browser/playwriter.md +0 -310
- package/.agent/tools/browser/stagehand-examples.md +0 -456
- package/.agent/tools/browser/stagehand-python.md +0 -483
- package/.agent/tools/browser/stagehand.md +0 -421
- package/.agent/tools/build-agent/agent-review.md +0 -224
- package/.agent/tools/build-agent/build-agent.md +0 -784
- package/.agent/tools/build-mcp/aidevops-plugin.md +0 -476
- package/.agent/tools/build-mcp/api-wrapper.md +0 -445
- package/.agent/tools/build-mcp/build-mcp.md +0 -240
- package/.agent/tools/build-mcp/deployment.md +0 -401
- package/.agent/tools/build-mcp/server-patterns.md +0 -632
- package/.agent/tools/build-mcp/transports.md +0 -366
- package/.agent/tools/code-review/auditing.md +0 -383
- package/.agent/tools/code-review/automation.md +0 -219
- package/.agent/tools/code-review/best-practices.md +0 -203
- package/.agent/tools/code-review/codacy.md +0 -151
- package/.agent/tools/code-review/code-simplifier.md +0 -174
- package/.agent/tools/code-review/code-standards.md +0 -309
- package/.agent/tools/code-review/coderabbit.md +0 -101
- package/.agent/tools/code-review/management.md +0 -155
- package/.agent/tools/code-review/qlty.md +0 -248
- package/.agent/tools/code-review/secretlint.md +0 -565
- package/.agent/tools/code-review/setup.md +0 -250
- package/.agent/tools/code-review/snyk.md +0 -563
- package/.agent/tools/code-review/tools.md +0 -230
- package/.agent/tools/content/summarize.md +0 -353
- package/.agent/tools/context/augment-context-engine.md +0 -468
- package/.agent/tools/context/context-builder-agent.md +0 -76
- package/.agent/tools/context/context-builder.md +0 -375
- package/.agent/tools/context/context7.md +0 -371
- package/.agent/tools/context/dspy.md +0 -302
- package/.agent/tools/context/dspyground.md +0 -374
- package/.agent/tools/context/llm-tldr.md +0 -219
- package/.agent/tools/context/osgrep.md +0 -488
- package/.agent/tools/context/prompt-optimization.md +0 -338
- package/.agent/tools/context/toon.md +0 -292
- package/.agent/tools/conversion/pandoc.md +0 -304
- package/.agent/tools/credentials/api-key-management.md +0 -154
- package/.agent/tools/credentials/api-key-setup.md +0 -224
- package/.agent/tools/credentials/environment-variables.md +0 -180
- package/.agent/tools/credentials/vaultwarden.md +0 -382
- package/.agent/tools/data-extraction/outscraper.md +0 -974
- package/.agent/tools/deployment/coolify-cli.md +0 -388
- package/.agent/tools/deployment/coolify-setup.md +0 -353
- package/.agent/tools/deployment/coolify.md +0 -345
- package/.agent/tools/deployment/vercel.md +0 -390
- package/.agent/tools/git/authentication.md +0 -132
- package/.agent/tools/git/gitea-cli.md +0 -193
- package/.agent/tools/git/github-actions.md +0 -207
- package/.agent/tools/git/github-cli.md +0 -223
- package/.agent/tools/git/gitlab-cli.md +0 -190
- package/.agent/tools/git/opencode-github-security.md +0 -350
- package/.agent/tools/git/opencode-github.md +0 -328
- package/.agent/tools/git/opencode-gitlab.md +0 -252
- package/.agent/tools/git/security.md +0 -196
- package/.agent/tools/git.md +0 -207
- package/.agent/tools/opencode/oh-my-opencode.md +0 -375
- package/.agent/tools/opencode/opencode-anthropic-auth.md +0 -446
- package/.agent/tools/opencode/opencode.md +0 -651
- package/.agent/tools/social-media/bird.md +0 -437
- package/.agent/tools/task-management/beads.md +0 -336
- package/.agent/tools/terminal/terminal-title.md +0 -251
- package/.agent/tools/ui/shadcn.md +0 -196
- package/.agent/tools/ui/ui-skills.md +0 -115
- package/.agent/tools/wordpress/localwp.md +0 -311
- package/.agent/tools/wordpress/mainwp.md +0 -391
- package/.agent/tools/wordpress/scf.md +0 -527
- package/.agent/tools/wordpress/wp-admin.md +0 -729
- package/.agent/tools/wordpress/wp-dev.md +0 -940
- package/.agent/tools/wordpress/wp-preferred.md +0 -398
- package/.agent/tools/wordpress.md +0 -95
- package/.agent/workflows/branch/bugfix.md +0 -63
- package/.agent/workflows/branch/chore.md +0 -95
- package/.agent/workflows/branch/experiment.md +0 -115
- package/.agent/workflows/branch/feature.md +0 -59
- package/.agent/workflows/branch/hotfix.md +0 -98
- package/.agent/workflows/branch/refactor.md +0 -92
- package/.agent/workflows/branch/release.md +0 -96
- package/.agent/workflows/branch.md +0 -347
- package/.agent/workflows/bug-fixing.md +0 -267
- package/.agent/workflows/changelog.md +0 -129
- package/.agent/workflows/code-audit-remote.md +0 -279
- package/.agent/workflows/conversation-starter.md +0 -69
- package/.agent/workflows/error-feedback.md +0 -578
- package/.agent/workflows/feature-development.md +0 -355
- package/.agent/workflows/git-workflow.md +0 -702
- package/.agent/workflows/multi-repo-workspace.md +0 -268
- package/.agent/workflows/plans.md +0 -709
- package/.agent/workflows/postflight.md +0 -604
- package/.agent/workflows/pr.md +0 -571
- package/.agent/workflows/preflight.md +0 -278
- package/.agent/workflows/ralph-loop.md +0 -773
- package/.agent/workflows/release.md +0 -498
- package/.agent/workflows/session-manager.md +0 -254
- package/.agent/workflows/session-review.md +0 -311
- package/.agent/workflows/sql-migrations.md +0 -631
- package/.agent/workflows/version-bump.md +0 -283
- package/.agent/workflows/wiki-update.md +0 -333
- package/.agent/workflows/worktree.md +0 -477
|
@@ -1,497 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# =============================================================================
|
|
3
|
-
# Generate OpenCode Agent Configuration
|
|
4
|
-
# =============================================================================
|
|
5
|
-
# Architecture:
|
|
6
|
-
# - Primary agents: Auto-discovered from root .md files in ~/.aidevops/agents/
|
|
7
|
-
# - Subagents: Auto-discovered from subfolder .md files (@mentionable)
|
|
8
|
-
# - AGENTS.md: At ~/.config/opencode/AGENTS.md (global context reference)
|
|
9
|
-
#
|
|
10
|
-
# Source: ~/.aidevops/agents/
|
|
11
|
-
# - Root .md files = Primary agents (auto-discovered, Tab-switchable)
|
|
12
|
-
# - Subfolder .md files = Subagents (auto-discovered, @mentionable)
|
|
13
|
-
#
|
|
14
|
-
# Agent Configuration:
|
|
15
|
-
# - Frontmatter in .md files can specify: mode, tools, temperature
|
|
16
|
-
# - Special handling for Plan+ (read-only) and agents with specific MCP needs
|
|
17
|
-
# - Default: full build permissions with common context tools
|
|
18
|
-
# =============================================================================
|
|
19
|
-
|
|
20
|
-
set -euo pipefail
|
|
21
|
-
|
|
22
|
-
AGENTS_DIR="$HOME/.aidevops/agents"
|
|
23
|
-
OPENCODE_CONFIG_DIR="$HOME/.config/opencode"
|
|
24
|
-
OPENCODE_AGENT_DIR="$OPENCODE_CONFIG_DIR/agent"
|
|
25
|
-
OPENCODE_CONFIG="$OPENCODE_CONFIG_DIR/opencode.json"
|
|
26
|
-
|
|
27
|
-
# Colors
|
|
28
|
-
GREEN='\033[0;32m'
|
|
29
|
-
BLUE='\033[0;34m'
|
|
30
|
-
YELLOW='\033[1;33m'
|
|
31
|
-
NC='\033[0m'
|
|
32
|
-
|
|
33
|
-
echo -e "${BLUE}Generating OpenCode agent configuration...${NC}"
|
|
34
|
-
|
|
35
|
-
# Ensure directories exist
|
|
36
|
-
mkdir -p "$OPENCODE_AGENT_DIR"
|
|
37
|
-
|
|
38
|
-
# Always update AGENTS.md with version check (ensures updates get deployed)
|
|
39
|
-
cat > "$OPENCODE_CONFIG_DIR/AGENTS.md" << 'EOF'
|
|
40
|
-
Add ~/.aidevops/agents/AGENTS.md to context for AI DevOps capabilities.
|
|
41
|
-
|
|
42
|
-
## aidevops Framework Status
|
|
43
|
-
|
|
44
|
-
**On conversation start**:
|
|
45
|
-
1. If Bash tool available: Run `bash ~/.aidevops/agents/scripts/aidevops-update-check.sh`
|
|
46
|
-
2. If Bash unavailable: Use Read tool on `~/.aidevops/agents/VERSION` to get version
|
|
47
|
-
3. Greet with: "Hi!\n\nWe're running https://aidevops.sh v{version}.\n\nWhat would you like to work on?"
|
|
48
|
-
4. Then respond to the user's actual message
|
|
49
|
-
|
|
50
|
-
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."
|
|
51
|
-
|
|
52
|
-
## Pre-Edit Git Check
|
|
53
|
-
|
|
54
|
-
Only for agents with Edit/Write/Bash tools. See ~/.aidevops/agents/AGENTS.md for workflow.
|
|
55
|
-
EOF
|
|
56
|
-
echo -e " ${GREEN}✓${NC} Updated AGENTS.md with version check"
|
|
57
|
-
|
|
58
|
-
# Remove old primary agent markdown files (they're now in JSON, auto-discovered)
|
|
59
|
-
# This cleans up any legacy files from before auto-discovery
|
|
60
|
-
# Also removes demoted agents that are now subagents in tools/
|
|
61
|
-
for f in Accounts.md Accounting.md accounting.md AI-DevOps.md Build+.md Content.md Health.md Legal.md Marketing.md Research.md Sales.md SEO.md WordPress.md Plan+.md Build-Agent.md Build-MCP.md build-agent.md build-mcp.md; do
|
|
62
|
-
rm -f "$OPENCODE_AGENT_DIR/$f"
|
|
63
|
-
done
|
|
64
|
-
|
|
65
|
-
# =============================================================================
|
|
66
|
-
# PRIMARY AGENTS - Defined in opencode.json for Tab order control
|
|
67
|
-
# =============================================================================
|
|
68
|
-
|
|
69
|
-
echo -e "${BLUE}Configuring primary agents in opencode.json...${NC}"
|
|
70
|
-
|
|
71
|
-
# Check if opencode.json exists
|
|
72
|
-
if [[ ! -f "$OPENCODE_CONFIG" ]]; then
|
|
73
|
-
echo -e "${YELLOW}Warning: $OPENCODE_CONFIG not found. Creating minimal config.${NC}"
|
|
74
|
-
# shellcheck disable=SC2016
|
|
75
|
-
echo '{"$schema": "https://opencode.ai/config.json"}' > "$OPENCODE_CONFIG"
|
|
76
|
-
fi
|
|
77
|
-
|
|
78
|
-
# Use Python to auto-discover and configure primary agents
|
|
79
|
-
python3 << 'PYEOF'
|
|
80
|
-
import json
|
|
81
|
-
import os
|
|
82
|
-
import glob
|
|
83
|
-
import re
|
|
84
|
-
|
|
85
|
-
config_path = os.path.expanduser("~/.config/opencode/opencode.json")
|
|
86
|
-
agents_dir = os.path.expanduser("~/.aidevops/agents")
|
|
87
|
-
|
|
88
|
-
try:
|
|
89
|
-
with open(config_path, 'r') as f:
|
|
90
|
-
config = json.load(f)
|
|
91
|
-
except:
|
|
92
|
-
config = {"$schema": "https://opencode.ai/config.json"}
|
|
93
|
-
|
|
94
|
-
# =============================================================================
|
|
95
|
-
# AUTO-DISCOVER PRIMARY AGENTS from root .md files
|
|
96
|
-
# =============================================================================
|
|
97
|
-
|
|
98
|
-
# Agent display name mappings (filename -> display name)
|
|
99
|
-
# If not in this map, derive from filename (e.g., build-agent.md -> Build-Agent)
|
|
100
|
-
DISPLAY_NAMES = {
|
|
101
|
-
"plan-plus": "Plan+",
|
|
102
|
-
"build-plus": "Build+",
|
|
103
|
-
"aidevops": "AI-DevOps",
|
|
104
|
-
"seo": "SEO",
|
|
105
|
-
"social-media": "Social-Media",
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
# Agent ordering (agents listed here appear first in this order, rest alphabetical)
|
|
109
|
-
# Note: Build-Agent and Build-MCP demoted to subagents in tools/ as of v2.41.0
|
|
110
|
-
AGENT_ORDER = ["Plan+", "Build+", "AI-DevOps"]
|
|
111
|
-
|
|
112
|
-
# Special tool configurations per agent (by display name)
|
|
113
|
-
# These are MCP tools that specific agents need access to
|
|
114
|
-
AGENT_TOOLS = {
|
|
115
|
-
"Plan+": {
|
|
116
|
-
# Read-only agent - no write/edit/bash
|
|
117
|
-
"write": False, "edit": False, "bash": False,
|
|
118
|
-
"read": True, "glob": True, "grep": True, "webfetch": True, "task": False,
|
|
119
|
-
"context7_*": True, "osgrep_*": True, "augment-context-engine_*": True, "repomix_*": True
|
|
120
|
-
},
|
|
121
|
-
"Build+": {
|
|
122
|
-
"write": True, "edit": True, "bash": True, "read": True, "glob": True, "grep": True,
|
|
123
|
-
"webfetch": True, "task": True, "todoread": True, "todowrite": True,
|
|
124
|
-
"context7_*": True, "osgrep_*": True, "augment-context-engine_*": True, "repomix_*": True
|
|
125
|
-
},
|
|
126
|
-
"AI-DevOps": {
|
|
127
|
-
"write": True, "edit": True, "bash": True, "read": True, "glob": True, "grep": True,
|
|
128
|
-
"webfetch": True, "task": True, "todoread": True, "todowrite": True,
|
|
129
|
-
"context7_*": True, "osgrep_*": True, "augment-context-engine_*": True, "repomix_*": True
|
|
130
|
-
},
|
|
131
|
-
"Onboarding": {
|
|
132
|
-
"write": True, "edit": True, "bash": True, "read": True, "glob": True, "grep": True,
|
|
133
|
-
"webfetch": True, "task": True,
|
|
134
|
-
"osgrep_*": True, "augment-context-engine_*": True
|
|
135
|
-
},
|
|
136
|
-
"Accounts": {
|
|
137
|
-
"write": True, "edit": True, "bash": True, "read": True, "glob": True, "grep": True,
|
|
138
|
-
"webfetch": True, "task": True, "quickfile_*": True,
|
|
139
|
-
"osgrep_*": True, "augment-context-engine_*": True
|
|
140
|
-
},
|
|
141
|
-
"Social-Media": {
|
|
142
|
-
"write": True, "edit": True, "bash": True, "read": True, "glob": True, "grep": True,
|
|
143
|
-
"webfetch": True, "task": True,
|
|
144
|
-
"osgrep_*": True, "augment-context-engine_*": True
|
|
145
|
-
},
|
|
146
|
-
"SEO": {
|
|
147
|
-
"write": True, "read": True, "bash": True, "webfetch": True,
|
|
148
|
-
"gsc_*": True, "ahrefs_*": True, "dataforseo_*": True, "serper_*": True,
|
|
149
|
-
"context7_*": True, "osgrep_*": True, "augment-context-engine_*": True
|
|
150
|
-
},
|
|
151
|
-
"WordPress": {
|
|
152
|
-
"write": True, "edit": True, "bash": True, "read": True, "glob": True, "grep": True,
|
|
153
|
-
"localwp_*": True, "context7_*": True, "osgrep_*": True, "augment-context-engine_*": True
|
|
154
|
-
},
|
|
155
|
-
"Content": {
|
|
156
|
-
"write": True, "edit": True, "read": True, "webfetch": True,
|
|
157
|
-
"osgrep_*": True, "augment-context-engine_*": True
|
|
158
|
-
},
|
|
159
|
-
"Research": {
|
|
160
|
-
"read": True, "webfetch": True, "bash": True,
|
|
161
|
-
"context7_*": True, "osgrep_*": True, "augment-context-engine_*": True
|
|
162
|
-
},
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
# Default tools for agents not in AGENT_TOOLS
|
|
166
|
-
DEFAULT_TOOLS = {
|
|
167
|
-
"write": True, "edit": True, "bash": True, "read": True, "glob": True, "grep": True,
|
|
168
|
-
"webfetch": True, "task": True,
|
|
169
|
-
"osgrep_*": True, "augment-context-engine_*": True
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
# Temperature settings (by display name, default 0.2)
|
|
173
|
-
AGENT_TEMPS = {
|
|
174
|
-
"Plan+": 0.2,
|
|
175
|
-
"Accounts": 0.1,
|
|
176
|
-
"Legal": 0.1,
|
|
177
|
-
"Content": 0.3,
|
|
178
|
-
"Marketing": 0.3,
|
|
179
|
-
"Research": 0.3,
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
# Files to skip (not primary agents)
|
|
183
|
-
SKIP_FILES = {"AGENTS.md", "README.md"}
|
|
184
|
-
|
|
185
|
-
def filename_to_display(filename):
|
|
186
|
-
"""Convert filename to display name."""
|
|
187
|
-
name = filename.replace(".md", "")
|
|
188
|
-
if name in DISPLAY_NAMES:
|
|
189
|
-
return DISPLAY_NAMES[name]
|
|
190
|
-
# Convert kebab-case to Title-Case
|
|
191
|
-
return "-".join(word.capitalize() for word in name.split("-"))
|
|
192
|
-
|
|
193
|
-
def get_agent_config(display_name, filename):
|
|
194
|
-
"""Generate agent configuration."""
|
|
195
|
-
tools = AGENT_TOOLS.get(display_name, DEFAULT_TOOLS.copy())
|
|
196
|
-
temp = AGENT_TEMPS.get(display_name, 0.2)
|
|
197
|
-
|
|
198
|
-
config = {
|
|
199
|
-
"description": f"Read ~/.aidevops/agents/{filename}",
|
|
200
|
-
"mode": "primary",
|
|
201
|
-
"temperature": temp,
|
|
202
|
-
"permission": {},
|
|
203
|
-
"tools": tools
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
# Special permissions
|
|
207
|
-
if display_name == "Plan+":
|
|
208
|
-
config["permission"] = {"edit": "deny", "write": "deny", "bash": "deny"}
|
|
209
|
-
else:
|
|
210
|
-
config["permission"] = {"external_directory": "allow"}
|
|
211
|
-
|
|
212
|
-
return config
|
|
213
|
-
|
|
214
|
-
# Discover all root-level .md files
|
|
215
|
-
primary_agents = {}
|
|
216
|
-
discovered = []
|
|
217
|
-
|
|
218
|
-
for filepath in glob.glob(os.path.join(agents_dir, "*.md")):
|
|
219
|
-
filename = os.path.basename(filepath)
|
|
220
|
-
if filename in SKIP_FILES:
|
|
221
|
-
continue
|
|
222
|
-
|
|
223
|
-
display_name = filename_to_display(filename)
|
|
224
|
-
primary_agents[display_name] = get_agent_config(display_name, filename)
|
|
225
|
-
discovered.append(display_name)
|
|
226
|
-
|
|
227
|
-
# Sort agents: ordered ones first, then alphabetical
|
|
228
|
-
def sort_key(name):
|
|
229
|
-
if name in AGENT_ORDER:
|
|
230
|
-
return (0, AGENT_ORDER.index(name))
|
|
231
|
-
return (1, name.lower())
|
|
232
|
-
|
|
233
|
-
sorted_agents = dict(sorted(primary_agents.items(), key=lambda x: sort_key(x[0])))
|
|
234
|
-
|
|
235
|
-
# =============================================================================
|
|
236
|
-
# OH-MY-OPENCODE AGENTS - Added after WordPress (end of alphabetical list)
|
|
237
|
-
# These are OmO's agents, disabled from replacing build/plan via omo_agent.disabled
|
|
238
|
-
# We re-add them here with controlled ordering
|
|
239
|
-
# =============================================================================
|
|
240
|
-
|
|
241
|
-
# Check if oh-my-opencode is installed
|
|
242
|
-
omo_config_path = os.path.expanduser("~/.config/opencode/oh-my-opencode.json")
|
|
243
|
-
if os.path.exists(omo_config_path):
|
|
244
|
-
try:
|
|
245
|
-
with open(omo_config_path, 'r') as f:
|
|
246
|
-
omo_config = json.load(f)
|
|
247
|
-
|
|
248
|
-
# Only add if omo_agent is disabled (we're taking control of ordering)
|
|
249
|
-
if omo_config.get('omo_agent', {}).get('disabled', False):
|
|
250
|
-
# Add Sisyphus after all other agents
|
|
251
|
-
sorted_agents["Sisyphus"] = {
|
|
252
|
-
"description": "OmO orchestrator - aggressive parallel execution with background agents (Claude Opus 4.5)",
|
|
253
|
-
"mode": "primary",
|
|
254
|
-
"temperature": 0.2,
|
|
255
|
-
"permission": {"external_directory": "allow"},
|
|
256
|
-
"tools": {
|
|
257
|
-
"write": True, "edit": True, "bash": True, "read": True, "glob": True, "grep": True,
|
|
258
|
-
"webfetch": True, "task": True, "todoread": True, "todowrite": True,
|
|
259
|
-
"context7_*": True, "osgrep_*": True, "augment-context-engine_*": True, "repomix_*": True
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
sorted_agents["Planner-Sisyphus"] = {
|
|
263
|
-
"description": "OmO planning agent - analysis and architecture without modifications",
|
|
264
|
-
"mode": "primary",
|
|
265
|
-
"temperature": 0.2,
|
|
266
|
-
"permission": {"edit": "deny", "write": "deny", "bash": "deny"},
|
|
267
|
-
"tools": {
|
|
268
|
-
"write": False, "edit": False, "bash": False,
|
|
269
|
-
"read": True, "glob": True, "grep": True, "webfetch": True, "task": False,
|
|
270
|
-
"context7_*": True, "osgrep_*": True, "augment-context-engine_*": True, "repomix_*": True
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
print(" Added OmO agents: Sisyphus, Planner-Sisyphus (after WordPress)")
|
|
274
|
-
except:
|
|
275
|
-
pass # OmO config not readable, skip
|
|
276
|
-
|
|
277
|
-
# =============================================================================
|
|
278
|
-
# DISABLE DEFAULT BUILD/PLAN AGENTS
|
|
279
|
-
# Build+ and Plan+ inherit and enhance the default agents, so we disable the
|
|
280
|
-
# originals to avoid confusion in the Tab cycle
|
|
281
|
-
# =============================================================================
|
|
282
|
-
|
|
283
|
-
sorted_agents["build"] = {"disable": True}
|
|
284
|
-
sorted_agents["plan"] = {"disable": True}
|
|
285
|
-
print(" Disabled default 'build' and 'plan' agents (replaced by Build+ and Plan+)")
|
|
286
|
-
|
|
287
|
-
config['agent'] = sorted_agents
|
|
288
|
-
|
|
289
|
-
print(f" Auto-discovered {len(sorted_agents)} primary agents from {agents_dir}")
|
|
290
|
-
print(f" Order: {', '.join(list(sorted_agents.keys())[:5])}...")
|
|
291
|
-
|
|
292
|
-
# =============================================================================
|
|
293
|
-
# MCP SERVERS - Ensure required MCP servers are configured
|
|
294
|
-
# =============================================================================
|
|
295
|
-
|
|
296
|
-
if 'mcp' not in config:
|
|
297
|
-
config['mcp'] = {}
|
|
298
|
-
|
|
299
|
-
if 'tools' not in config:
|
|
300
|
-
config['tools'] = {}
|
|
301
|
-
|
|
302
|
-
# osgrep MCP - local semantic search (primary, try first)
|
|
303
|
-
# Install: npm install -g osgrep && osgrep install-opencode
|
|
304
|
-
if 'osgrep' not in config['mcp']:
|
|
305
|
-
config['mcp']['osgrep'] = {
|
|
306
|
-
"type": "local",
|
|
307
|
-
"command": ["osgrep", "mcp"],
|
|
308
|
-
"enabled": True
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
# Ensure osgrep_* is disabled globally (enabled per-agent)
|
|
312
|
-
if 'osgrep_*' not in config['tools']:
|
|
313
|
-
config['tools']['osgrep_*'] = False
|
|
314
|
-
|
|
315
|
-
# Outscraper MCP - for business intelligence extraction (subagent only)
|
|
316
|
-
if 'outscraper' not in config['mcp']:
|
|
317
|
-
config['mcp']['outscraper'] = {
|
|
318
|
-
"type": "local",
|
|
319
|
-
"command": ["/bin/bash", "-c", "OUTSCRAPER_API_KEY=$OUTSCRAPER_API_KEY uv tool run outscraper-mcp-server"],
|
|
320
|
-
"enabled": True
|
|
321
|
-
}
|
|
322
|
-
print(" Added outscraper MCP server")
|
|
323
|
-
|
|
324
|
-
if 'outscraper_*' not in config['tools']:
|
|
325
|
-
config['tools']['outscraper_*'] = False
|
|
326
|
-
print(" Added outscraper_* to tools (disabled globally, enabled for @outscraper subagent)")
|
|
327
|
-
|
|
328
|
-
# DataForSEO MCP - for comprehensive SEO data
|
|
329
|
-
# Uses bun x if available, falls back to npx
|
|
330
|
-
import shutil
|
|
331
|
-
bun_path = shutil.which('bun')
|
|
332
|
-
npx_path = shutil.which('npx') or '/opt/homebrew/bin/npx'
|
|
333
|
-
pkg_runner = f"{bun_path} x" if bun_path else npx_path
|
|
334
|
-
|
|
335
|
-
if 'dataforseo' not in config['mcp']:
|
|
336
|
-
config['mcp']['dataforseo'] = {
|
|
337
|
-
"type": "local",
|
|
338
|
-
"command": ["/bin/bash", "-c", f"source ~/.config/aidevops/mcp-env.sh && DATAFORSEO_USERNAME=$DATAFORSEO_USERNAME DATAFORSEO_PASSWORD=$DATAFORSEO_PASSWORD {pkg_runner} dataforseo-mcp-server"],
|
|
339
|
-
"enabled": True
|
|
340
|
-
}
|
|
341
|
-
print(" Added dataforseo MCP server")
|
|
342
|
-
|
|
343
|
-
if 'dataforseo_*' not in config['tools']:
|
|
344
|
-
config['tools']['dataforseo_*'] = False
|
|
345
|
-
print(" Added dataforseo_* to tools (disabled globally, enabled for SEO agent)")
|
|
346
|
-
|
|
347
|
-
# Serper MCP - for Google Search API
|
|
348
|
-
if 'serper' not in config['mcp']:
|
|
349
|
-
config['mcp']['serper'] = {
|
|
350
|
-
"type": "local",
|
|
351
|
-
"command": ["/bin/bash", "-c", f"source ~/.config/aidevops/mcp-env.sh && SERPER_API_KEY=$SERPER_API_KEY {pkg_runner} serper-mcp-server"],
|
|
352
|
-
"enabled": True
|
|
353
|
-
}
|
|
354
|
-
print(" Added serper MCP server")
|
|
355
|
-
|
|
356
|
-
if 'serper_*' not in config['tools']:
|
|
357
|
-
config['tools']['serper_*'] = False
|
|
358
|
-
print(" Added serper_* to tools (disabled globally, enabled for SEO agent)")
|
|
359
|
-
|
|
360
|
-
# Playwriter MCP - browser automation via Chrome extension
|
|
361
|
-
# Requires: Chrome extension from https://chromewebstore.google.com/detail/playwriter-mcp/jfeammnjpkecdekppnclgkkffahnhfhe
|
|
362
|
-
if 'playwriter' not in config['mcp']:
|
|
363
|
-
if bun_path:
|
|
364
|
-
config['mcp']['playwriter'] = {
|
|
365
|
-
"type": "local",
|
|
366
|
-
"command": ["bun", "x", "playwriter@latest"],
|
|
367
|
-
"enabled": True
|
|
368
|
-
}
|
|
369
|
-
else:
|
|
370
|
-
config['mcp']['playwriter'] = {
|
|
371
|
-
"type": "local",
|
|
372
|
-
"command": ["npx", "playwriter@latest"],
|
|
373
|
-
"enabled": True
|
|
374
|
-
}
|
|
375
|
-
print(" Added playwriter MCP server (install Chrome extension separately)")
|
|
376
|
-
|
|
377
|
-
# shadcn MCP - UI component library for browsing, searching, and installing components
|
|
378
|
-
# Docs: https://ui.shadcn.com/docs/mcp
|
|
379
|
-
if 'shadcn' not in config['mcp']:
|
|
380
|
-
config['mcp']['shadcn'] = {
|
|
381
|
-
"type": "local",
|
|
382
|
-
"command": ["npx", "shadcn@latest", "mcp"],
|
|
383
|
-
"enabled": True
|
|
384
|
-
}
|
|
385
|
-
print(" Added shadcn MCP server")
|
|
386
|
-
|
|
387
|
-
if 'shadcn_*' not in config['tools']:
|
|
388
|
-
config['tools']['shadcn_*'] = False
|
|
389
|
-
print(" Added shadcn_* to tools (disabled globally, enabled for @shadcn subagent)")
|
|
390
|
-
|
|
391
|
-
with open(config_path, 'w') as f:
|
|
392
|
-
json.dump(config, f, indent=2)
|
|
393
|
-
|
|
394
|
-
print(f" Updated {len(primary_agents)} primary agents in opencode.json")
|
|
395
|
-
PYEOF
|
|
396
|
-
|
|
397
|
-
echo -e " ${GREEN}✓${NC} Primary agents configured in opencode.json"
|
|
398
|
-
|
|
399
|
-
# =============================================================================
|
|
400
|
-
# SUBAGENTS - Generated as markdown files (@mentionable)
|
|
401
|
-
# =============================================================================
|
|
402
|
-
|
|
403
|
-
echo -e "${BLUE}Generating subagent markdown files...${NC}"
|
|
404
|
-
|
|
405
|
-
# Remove existing subagent files (regenerate fresh)
|
|
406
|
-
find "$OPENCODE_AGENT_DIR" -name "*.md" -type f -delete 2>/dev/null || true
|
|
407
|
-
|
|
408
|
-
subagent_count=0
|
|
409
|
-
|
|
410
|
-
# Generate SUBAGENT files from subfolders
|
|
411
|
-
# Some subagents need specific MCP tools enabled
|
|
412
|
-
while IFS= read -r f; do
|
|
413
|
-
name=$(basename "$f" .md)
|
|
414
|
-
[[ "$name" == "AGENTS" || "$name" == "README" ]] && continue
|
|
415
|
-
|
|
416
|
-
rel_path="${f#"$AGENTS_DIR"/}"
|
|
417
|
-
|
|
418
|
-
# Determine additional tools based on subagent name/path
|
|
419
|
-
extra_tools=""
|
|
420
|
-
case "$name" in
|
|
421
|
-
outscraper)
|
|
422
|
-
extra_tools=$' outscraper_*: true\n webfetch: true'
|
|
423
|
-
;;
|
|
424
|
-
mainwp|localwp)
|
|
425
|
-
extra_tools=$' localwp_*: true'
|
|
426
|
-
;;
|
|
427
|
-
quickfile)
|
|
428
|
-
extra_tools=$' quickfile_*: true'
|
|
429
|
-
;;
|
|
430
|
-
google-search-console)
|
|
431
|
-
extra_tools=$' gsc_*: true'
|
|
432
|
-
;;
|
|
433
|
-
dataforseo)
|
|
434
|
-
extra_tools=$' dataforseo_*: true\n webfetch: true'
|
|
435
|
-
;;
|
|
436
|
-
serper)
|
|
437
|
-
extra_tools=$' serper_*: true\n webfetch: true'
|
|
438
|
-
;;
|
|
439
|
-
playwriter)
|
|
440
|
-
extra_tools=$' playwriter_*: true'
|
|
441
|
-
;;
|
|
442
|
-
shadcn)
|
|
443
|
-
extra_tools=$' shadcn_*: true\n write: true\n edit: true'
|
|
444
|
-
;;
|
|
445
|
-
*)
|
|
446
|
-
;; # No extra tools for other agents
|
|
447
|
-
esac
|
|
448
|
-
|
|
449
|
-
if [[ -n "$extra_tools" ]]; then
|
|
450
|
-
cat > "$OPENCODE_AGENT_DIR/$name.md" << EOF
|
|
451
|
-
---
|
|
452
|
-
description: Read ~/.aidevops/agents/${rel_path}
|
|
453
|
-
mode: subagent
|
|
454
|
-
temperature: 0.2
|
|
455
|
-
permission:
|
|
456
|
-
external_directory: allow
|
|
457
|
-
tools:
|
|
458
|
-
read: true
|
|
459
|
-
bash: true
|
|
460
|
-
$extra_tools
|
|
461
|
-
---
|
|
462
|
-
EOF
|
|
463
|
-
else
|
|
464
|
-
cat > "$OPENCODE_AGENT_DIR/$name.md" << EOF
|
|
465
|
-
---
|
|
466
|
-
description: Read ~/.aidevops/agents/${rel_path}
|
|
467
|
-
mode: subagent
|
|
468
|
-
temperature: 0.2
|
|
469
|
-
permission:
|
|
470
|
-
external_directory: allow
|
|
471
|
-
tools:
|
|
472
|
-
read: true
|
|
473
|
-
bash: true
|
|
474
|
-
---
|
|
475
|
-
EOF
|
|
476
|
-
fi
|
|
477
|
-
((subagent_count++))
|
|
478
|
-
done < <(find "$AGENTS_DIR" -mindepth 2 -name "*.md" -type f | sort)
|
|
479
|
-
|
|
480
|
-
echo -e " ${GREEN}✓${NC} Generated $subagent_count subagent files"
|
|
481
|
-
|
|
482
|
-
# =============================================================================
|
|
483
|
-
# SUMMARY
|
|
484
|
-
# =============================================================================
|
|
485
|
-
|
|
486
|
-
echo ""
|
|
487
|
-
echo -e "${GREEN}Done!${NC}"
|
|
488
|
-
echo " Primary agents: Auto-discovered from ~/.aidevops/agents/*.md (Tab-switchable)"
|
|
489
|
-
echo " Subagents: $subagent_count auto-discovered from subfolders (@mentionable)"
|
|
490
|
-
echo " AGENTS.md: ~/.config/opencode/AGENTS.md"
|
|
491
|
-
echo ""
|
|
492
|
-
echo "Tab order: Plan+ → Build+ → AI-DevOps → (alphabetical)"
|
|
493
|
-
echo ""
|
|
494
|
-
echo "To add a new primary agent: Create ~/.aidevops/agents/{name}.md"
|
|
495
|
-
echo "To add a new subagent: Create ~/.aidevops/agents/{folder}/{name}.md"
|
|
496
|
-
echo ""
|
|
497
|
-
echo "Restart OpenCode to load new configuration."
|