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.
Files changed (334) hide show
  1. package/README.md +1 -1
  2. package/VERSION +1 -1
  3. package/aidevops.sh +15 -9
  4. package/package.json +4 -4
  5. package/scripts/npm-postinstall.js +6 -7
  6. package/setup.sh +1 -1
  7. package/templates/deploy-templates.sh +144 -0
  8. package/templates/home/.agent/README.md +33 -0
  9. package/templates/home/AGENTS.md +96 -0
  10. package/templates/home/git/.agent/README.md +48 -0
  11. package/templates/home/git/AGENTS.md +97 -0
  12. package/templates/standard-functions.sh +179 -0
  13. package/templates/wordpress-performance-workflow.md +217 -0
  14. package/.agent/AGENTS.md +0 -614
  15. package/.agent/accounts.md +0 -65
  16. package/.agent/aidevops/add-new-mcp-to-aidevops.md +0 -456
  17. package/.agent/aidevops/api-integrations.md +0 -335
  18. package/.agent/aidevops/architecture.md +0 -510
  19. package/.agent/aidevops/configs.md +0 -274
  20. package/.agent/aidevops/docs.md +0 -244
  21. package/.agent/aidevops/extension.md +0 -311
  22. package/.agent/aidevops/mcp-integrations.md +0 -340
  23. package/.agent/aidevops/mcp-troubleshooting.md +0 -162
  24. package/.agent/aidevops/memory-patterns.md +0 -172
  25. package/.agent/aidevops/providers.md +0 -217
  26. package/.agent/aidevops/recommendations.md +0 -321
  27. package/.agent/aidevops/requirements.md +0 -301
  28. package/.agent/aidevops/resources.md +0 -214
  29. package/.agent/aidevops/security-requirements.md +0 -174
  30. package/.agent/aidevops/security.md +0 -350
  31. package/.agent/aidevops/service-links.md +0 -400
  32. package/.agent/aidevops/services.md +0 -357
  33. package/.agent/aidevops/setup.md +0 -153
  34. package/.agent/aidevops/troubleshooting.md +0 -389
  35. package/.agent/aidevops.md +0 -124
  36. package/.agent/build-plus.md +0 -244
  37. package/.agent/content/guidelines.md +0 -109
  38. package/.agent/content.md +0 -87
  39. package/.agent/health.md +0 -59
  40. package/.agent/legal.md +0 -59
  41. package/.agent/loop-state/full-loop.local.md +0 -16
  42. package/.agent/loop-state/ralph-loop.local.md +0 -10
  43. package/.agent/marketing.md +0 -440
  44. package/.agent/memory/README.md +0 -260
  45. package/.agent/onboarding.md +0 -796
  46. package/.agent/plan-plus.md +0 -245
  47. package/.agent/research.md +0 -100
  48. package/.agent/sales.md +0 -333
  49. package/.agent/scripts/101domains-helper.sh +0 -701
  50. package/.agent/scripts/add-missing-returns.sh +0 -140
  51. package/.agent/scripts/agent-browser-helper.sh +0 -311
  52. package/.agent/scripts/agno-setup.sh +0 -712
  53. package/.agent/scripts/ahrefs-mcp-wrapper.js +0 -168
  54. package/.agent/scripts/aidevops-update-check.sh +0 -71
  55. package/.agent/scripts/ampcode-cli.sh +0 -522
  56. package/.agent/scripts/auto-version-bump.sh +0 -156
  57. package/.agent/scripts/autogen-helper.sh +0 -512
  58. package/.agent/scripts/beads-sync-helper.sh +0 -596
  59. package/.agent/scripts/closte-helper.sh +0 -5
  60. package/.agent/scripts/cloudron-helper.sh +0 -321
  61. package/.agent/scripts/codacy-cli-chunked.sh +0 -581
  62. package/.agent/scripts/codacy-cli.sh +0 -442
  63. package/.agent/scripts/code-audit-helper.sh +0 -5
  64. package/.agent/scripts/coderabbit-cli.sh +0 -417
  65. package/.agent/scripts/coderabbit-pro-analysis.sh +0 -238
  66. package/.agent/scripts/commands/code-simplifier.md +0 -86
  67. package/.agent/scripts/commands/full-loop.md +0 -246
  68. package/.agent/scripts/commands/postflight-loop.md +0 -103
  69. package/.agent/scripts/commands/recall.md +0 -182
  70. package/.agent/scripts/commands/remember.md +0 -132
  71. package/.agent/scripts/commands/save-todo.md +0 -175
  72. package/.agent/scripts/commands/session-review.md +0 -154
  73. package/.agent/scripts/comprehensive-quality-fix.sh +0 -106
  74. package/.agent/scripts/context-builder-helper.sh +0 -522
  75. package/.agent/scripts/coolify-cli-helper.sh +0 -674
  76. package/.agent/scripts/coolify-helper.sh +0 -380
  77. package/.agent/scripts/crawl4ai-examples.sh +0 -401
  78. package/.agent/scripts/crawl4ai-helper.sh +0 -1078
  79. package/.agent/scripts/crewai-helper.sh +0 -681
  80. package/.agent/scripts/dev-browser-helper.sh +0 -513
  81. package/.agent/scripts/dns-helper.sh +0 -396
  82. package/.agent/scripts/domain-research-helper.sh +0 -917
  83. package/.agent/scripts/dspy-helper.sh +0 -285
  84. package/.agent/scripts/dspyground-helper.sh +0 -291
  85. package/.agent/scripts/eeat-score-helper.sh +0 -1242
  86. package/.agent/scripts/efficient-return-fix.sh +0 -92
  87. package/.agent/scripts/extract-opencode-prompts.sh +0 -128
  88. package/.agent/scripts/find-missing-returns.sh +0 -113
  89. package/.agent/scripts/fix-auth-headers.sh +0 -104
  90. package/.agent/scripts/fix-common-strings.sh +0 -254
  91. package/.agent/scripts/fix-content-type.sh +0 -100
  92. package/.agent/scripts/fix-error-messages.sh +0 -130
  93. package/.agent/scripts/fix-misplaced-returns.sh +0 -74
  94. package/.agent/scripts/fix-remaining-literals.sh +0 -152
  95. package/.agent/scripts/fix-return-statements.sh +0 -41
  96. package/.agent/scripts/fix-s131-default-cases.sh +0 -249
  97. package/.agent/scripts/fix-sc2155-simple.sh +0 -102
  98. package/.agent/scripts/fix-shellcheck-critical.sh +0 -187
  99. package/.agent/scripts/fix-string-literals.sh +0 -273
  100. package/.agent/scripts/full-loop-helper.sh +0 -773
  101. package/.agent/scripts/generate-opencode-agents.sh +0 -497
  102. package/.agent/scripts/generate-opencode-commands.sh +0 -1629
  103. package/.agent/scripts/generate-skills.sh +0 -366
  104. package/.agent/scripts/git-platforms-helper.sh +0 -640
  105. package/.agent/scripts/gitea-cli-helper.sh +0 -743
  106. package/.agent/scripts/github-cli-helper.sh +0 -702
  107. package/.agent/scripts/gitlab-cli-helper.sh +0 -682
  108. package/.agent/scripts/gsc-add-user-helper.sh +0 -325
  109. package/.agent/scripts/gsc-sitemap-helper.sh +0 -678
  110. package/.agent/scripts/hetzner-helper.sh +0 -485
  111. package/.agent/scripts/hostinger-helper.sh +0 -229
  112. package/.agent/scripts/keyword-research-helper.sh +0 -1815
  113. package/.agent/scripts/langflow-helper.sh +0 -544
  114. package/.agent/scripts/linkedin-automation.py +0 -241
  115. package/.agent/scripts/linter-manager.sh +0 -599
  116. package/.agent/scripts/linters-local.sh +0 -434
  117. package/.agent/scripts/list-keys-helper.sh +0 -488
  118. package/.agent/scripts/local-browser-automation.py +0 -339
  119. package/.agent/scripts/localhost-helper.sh +0 -744
  120. package/.agent/scripts/loop-common.sh +0 -806
  121. package/.agent/scripts/mainwp-helper.sh +0 -728
  122. package/.agent/scripts/markdown-formatter.sh +0 -338
  123. package/.agent/scripts/markdown-lint-fix.sh +0 -311
  124. package/.agent/scripts/mass-fix-returns.sh +0 -58
  125. package/.agent/scripts/mcp-diagnose.sh +0 -167
  126. package/.agent/scripts/mcp-inspector-helper.sh +0 -449
  127. package/.agent/scripts/memory-helper.sh +0 -650
  128. package/.agent/scripts/monitor-code-review.sh +0 -255
  129. package/.agent/scripts/onboarding-helper.sh +0 -706
  130. package/.agent/scripts/opencode-github-setup-helper.sh +0 -797
  131. package/.agent/scripts/opencode-test-helper.sh +0 -213
  132. package/.agent/scripts/pagespeed-helper.sh +0 -464
  133. package/.agent/scripts/pandoc-helper.sh +0 -362
  134. package/.agent/scripts/postflight-check.sh +0 -555
  135. package/.agent/scripts/pre-commit-hook.sh +0 -259
  136. package/.agent/scripts/pre-edit-check.sh +0 -169
  137. package/.agent/scripts/qlty-cli.sh +0 -356
  138. package/.agent/scripts/quality-cli-manager.sh +0 -525
  139. package/.agent/scripts/quality-feedback-helper.sh +0 -462
  140. package/.agent/scripts/quality-fix.sh +0 -263
  141. package/.agent/scripts/quality-loop-helper.sh +0 -1108
  142. package/.agent/scripts/ralph-loop-helper.sh +0 -836
  143. package/.agent/scripts/ralph-upstream-check.sh +0 -341
  144. package/.agent/scripts/secretlint-helper.sh +0 -847
  145. package/.agent/scripts/servers-helper.sh +0 -241
  146. package/.agent/scripts/ses-helper.sh +0 -619
  147. package/.agent/scripts/session-review-helper.sh +0 -404
  148. package/.agent/scripts/setup-linters-wizard.sh +0 -379
  149. package/.agent/scripts/setup-local-api-keys.sh +0 -330
  150. package/.agent/scripts/setup-mcp-integrations.sh +0 -472
  151. package/.agent/scripts/shared-constants.sh +0 -246
  152. package/.agent/scripts/site-crawler-helper.sh +0 -1487
  153. package/.agent/scripts/snyk-helper.sh +0 -940
  154. package/.agent/scripts/sonarcloud-autofix.sh +0 -193
  155. package/.agent/scripts/sonarcloud-cli.sh +0 -191
  156. package/.agent/scripts/sonarscanner-cli.sh +0 -455
  157. package/.agent/scripts/spaceship-helper.sh +0 -747
  158. package/.agent/scripts/stagehand-helper.sh +0 -321
  159. package/.agent/scripts/stagehand-python-helper.sh +0 -321
  160. package/.agent/scripts/stagehand-python-setup.sh +0 -441
  161. package/.agent/scripts/stagehand-setup.sh +0 -439
  162. package/.agent/scripts/system-cleanup.sh +0 -340
  163. package/.agent/scripts/terminal-title-helper.sh +0 -388
  164. package/.agent/scripts/terminal-title-setup.sh +0 -549
  165. package/.agent/scripts/test-stagehand-both-integration.sh +0 -317
  166. package/.agent/scripts/test-stagehand-integration.sh +0 -309
  167. package/.agent/scripts/test-stagehand-python-integration.sh +0 -341
  168. package/.agent/scripts/todo-ready.sh +0 -263
  169. package/.agent/scripts/tool-version-check.sh +0 -362
  170. package/.agent/scripts/toon-helper.sh +0 -469
  171. package/.agent/scripts/twilio-helper.sh +0 -917
  172. package/.agent/scripts/updown-helper.sh +0 -279
  173. package/.agent/scripts/validate-mcp-integrations.sh +0 -250
  174. package/.agent/scripts/validate-version-consistency.sh +0 -131
  175. package/.agent/scripts/vaultwarden-helper.sh +0 -597
  176. package/.agent/scripts/vercel-cli-helper.sh +0 -816
  177. package/.agent/scripts/verify-mirrors.sh +0 -169
  178. package/.agent/scripts/version-manager.sh +0 -831
  179. package/.agent/scripts/webhosting-helper.sh +0 -471
  180. package/.agent/scripts/webhosting-verify.sh +0 -238
  181. package/.agent/scripts/wordpress-mcp-helper.sh +0 -508
  182. package/.agent/scripts/worktree-helper.sh +0 -595
  183. package/.agent/scripts/worktree-sessions.sh +0 -577
  184. package/.agent/seo/dataforseo.md +0 -215
  185. package/.agent/seo/domain-research.md +0 -532
  186. package/.agent/seo/eeat-score.md +0 -659
  187. package/.agent/seo/google-search-console.md +0 -366
  188. package/.agent/seo/gsc-sitemaps.md +0 -282
  189. package/.agent/seo/keyword-research.md +0 -521
  190. package/.agent/seo/serper.md +0 -278
  191. package/.agent/seo/site-crawler.md +0 -387
  192. package/.agent/seo.md +0 -236
  193. package/.agent/services/accounting/quickfile.md +0 -159
  194. package/.agent/services/communications/telfon.md +0 -470
  195. package/.agent/services/communications/twilio.md +0 -569
  196. package/.agent/services/crm/fluentcrm.md +0 -449
  197. package/.agent/services/email/ses.md +0 -399
  198. package/.agent/services/hosting/101domains.md +0 -378
  199. package/.agent/services/hosting/closte.md +0 -177
  200. package/.agent/services/hosting/cloudflare.md +0 -251
  201. package/.agent/services/hosting/cloudron.md +0 -478
  202. package/.agent/services/hosting/dns-providers.md +0 -335
  203. package/.agent/services/hosting/domain-purchasing.md +0 -344
  204. package/.agent/services/hosting/hetzner.md +0 -327
  205. package/.agent/services/hosting/hostinger.md +0 -287
  206. package/.agent/services/hosting/localhost.md +0 -419
  207. package/.agent/services/hosting/spaceship.md +0 -353
  208. package/.agent/services/hosting/webhosting.md +0 -330
  209. package/.agent/social-media.md +0 -69
  210. package/.agent/templates/plans-template.md +0 -114
  211. package/.agent/templates/prd-template.md +0 -129
  212. package/.agent/templates/tasks-template.md +0 -108
  213. package/.agent/templates/todo-template.md +0 -89
  214. package/.agent/tools/ai-assistants/agno.md +0 -471
  215. package/.agent/tools/ai-assistants/capsolver.md +0 -326
  216. package/.agent/tools/ai-assistants/configuration.md +0 -221
  217. package/.agent/tools/ai-assistants/overview.md +0 -209
  218. package/.agent/tools/ai-assistants/status.md +0 -171
  219. package/.agent/tools/ai-assistants/windsurf.md +0 -193
  220. package/.agent/tools/ai-orchestration/autogen.md +0 -406
  221. package/.agent/tools/ai-orchestration/crewai.md +0 -445
  222. package/.agent/tools/ai-orchestration/langflow.md +0 -405
  223. package/.agent/tools/ai-orchestration/openprose.md +0 -487
  224. package/.agent/tools/ai-orchestration/overview.md +0 -362
  225. package/.agent/tools/ai-orchestration/packaging.md +0 -647
  226. package/.agent/tools/browser/agent-browser.md +0 -464
  227. package/.agent/tools/browser/browser-automation.md +0 -400
  228. package/.agent/tools/browser/chrome-devtools.md +0 -282
  229. package/.agent/tools/browser/crawl4ai-integration.md +0 -422
  230. package/.agent/tools/browser/crawl4ai-resources.md +0 -277
  231. package/.agent/tools/browser/crawl4ai-usage.md +0 -416
  232. package/.agent/tools/browser/crawl4ai.md +0 -585
  233. package/.agent/tools/browser/dev-browser.md +0 -341
  234. package/.agent/tools/browser/pagespeed.md +0 -260
  235. package/.agent/tools/browser/playwright.md +0 -266
  236. package/.agent/tools/browser/playwriter.md +0 -310
  237. package/.agent/tools/browser/stagehand-examples.md +0 -456
  238. package/.agent/tools/browser/stagehand-python.md +0 -483
  239. package/.agent/tools/browser/stagehand.md +0 -421
  240. package/.agent/tools/build-agent/agent-review.md +0 -224
  241. package/.agent/tools/build-agent/build-agent.md +0 -784
  242. package/.agent/tools/build-mcp/aidevops-plugin.md +0 -476
  243. package/.agent/tools/build-mcp/api-wrapper.md +0 -445
  244. package/.agent/tools/build-mcp/build-mcp.md +0 -240
  245. package/.agent/tools/build-mcp/deployment.md +0 -401
  246. package/.agent/tools/build-mcp/server-patterns.md +0 -632
  247. package/.agent/tools/build-mcp/transports.md +0 -366
  248. package/.agent/tools/code-review/auditing.md +0 -383
  249. package/.agent/tools/code-review/automation.md +0 -219
  250. package/.agent/tools/code-review/best-practices.md +0 -203
  251. package/.agent/tools/code-review/codacy.md +0 -151
  252. package/.agent/tools/code-review/code-simplifier.md +0 -174
  253. package/.agent/tools/code-review/code-standards.md +0 -309
  254. package/.agent/tools/code-review/coderabbit.md +0 -101
  255. package/.agent/tools/code-review/management.md +0 -155
  256. package/.agent/tools/code-review/qlty.md +0 -248
  257. package/.agent/tools/code-review/secretlint.md +0 -565
  258. package/.agent/tools/code-review/setup.md +0 -250
  259. package/.agent/tools/code-review/snyk.md +0 -563
  260. package/.agent/tools/code-review/tools.md +0 -230
  261. package/.agent/tools/content/summarize.md +0 -353
  262. package/.agent/tools/context/augment-context-engine.md +0 -468
  263. package/.agent/tools/context/context-builder-agent.md +0 -76
  264. package/.agent/tools/context/context-builder.md +0 -375
  265. package/.agent/tools/context/context7.md +0 -371
  266. package/.agent/tools/context/dspy.md +0 -302
  267. package/.agent/tools/context/dspyground.md +0 -374
  268. package/.agent/tools/context/llm-tldr.md +0 -219
  269. package/.agent/tools/context/osgrep.md +0 -488
  270. package/.agent/tools/context/prompt-optimization.md +0 -338
  271. package/.agent/tools/context/toon.md +0 -292
  272. package/.agent/tools/conversion/pandoc.md +0 -304
  273. package/.agent/tools/credentials/api-key-management.md +0 -154
  274. package/.agent/tools/credentials/api-key-setup.md +0 -224
  275. package/.agent/tools/credentials/environment-variables.md +0 -180
  276. package/.agent/tools/credentials/vaultwarden.md +0 -382
  277. package/.agent/tools/data-extraction/outscraper.md +0 -974
  278. package/.agent/tools/deployment/coolify-cli.md +0 -388
  279. package/.agent/tools/deployment/coolify-setup.md +0 -353
  280. package/.agent/tools/deployment/coolify.md +0 -345
  281. package/.agent/tools/deployment/vercel.md +0 -390
  282. package/.agent/tools/git/authentication.md +0 -132
  283. package/.agent/tools/git/gitea-cli.md +0 -193
  284. package/.agent/tools/git/github-actions.md +0 -207
  285. package/.agent/tools/git/github-cli.md +0 -223
  286. package/.agent/tools/git/gitlab-cli.md +0 -190
  287. package/.agent/tools/git/opencode-github-security.md +0 -350
  288. package/.agent/tools/git/opencode-github.md +0 -328
  289. package/.agent/tools/git/opencode-gitlab.md +0 -252
  290. package/.agent/tools/git/security.md +0 -196
  291. package/.agent/tools/git.md +0 -207
  292. package/.agent/tools/opencode/oh-my-opencode.md +0 -375
  293. package/.agent/tools/opencode/opencode-anthropic-auth.md +0 -446
  294. package/.agent/tools/opencode/opencode.md +0 -651
  295. package/.agent/tools/social-media/bird.md +0 -437
  296. package/.agent/tools/task-management/beads.md +0 -336
  297. package/.agent/tools/terminal/terminal-title.md +0 -251
  298. package/.agent/tools/ui/shadcn.md +0 -196
  299. package/.agent/tools/ui/ui-skills.md +0 -115
  300. package/.agent/tools/wordpress/localwp.md +0 -311
  301. package/.agent/tools/wordpress/mainwp.md +0 -391
  302. package/.agent/tools/wordpress/scf.md +0 -527
  303. package/.agent/tools/wordpress/wp-admin.md +0 -729
  304. package/.agent/tools/wordpress/wp-dev.md +0 -940
  305. package/.agent/tools/wordpress/wp-preferred.md +0 -398
  306. package/.agent/tools/wordpress.md +0 -95
  307. package/.agent/workflows/branch/bugfix.md +0 -63
  308. package/.agent/workflows/branch/chore.md +0 -95
  309. package/.agent/workflows/branch/experiment.md +0 -115
  310. package/.agent/workflows/branch/feature.md +0 -59
  311. package/.agent/workflows/branch/hotfix.md +0 -98
  312. package/.agent/workflows/branch/refactor.md +0 -92
  313. package/.agent/workflows/branch/release.md +0 -96
  314. package/.agent/workflows/branch.md +0 -347
  315. package/.agent/workflows/bug-fixing.md +0 -267
  316. package/.agent/workflows/changelog.md +0 -129
  317. package/.agent/workflows/code-audit-remote.md +0 -279
  318. package/.agent/workflows/conversation-starter.md +0 -69
  319. package/.agent/workflows/error-feedback.md +0 -578
  320. package/.agent/workflows/feature-development.md +0 -355
  321. package/.agent/workflows/git-workflow.md +0 -702
  322. package/.agent/workflows/multi-repo-workspace.md +0 -268
  323. package/.agent/workflows/plans.md +0 -709
  324. package/.agent/workflows/postflight.md +0 -604
  325. package/.agent/workflows/pr.md +0 -571
  326. package/.agent/workflows/preflight.md +0 -278
  327. package/.agent/workflows/ralph-loop.md +0 -773
  328. package/.agent/workflows/release.md +0 -498
  329. package/.agent/workflows/session-manager.md +0 -254
  330. package/.agent/workflows/session-review.md +0 -311
  331. package/.agent/workflows/sql-migrations.md +0 -631
  332. package/.agent/workflows/version-bump.md +0 -283
  333. package/.agent/workflows/wiki-update.md +0 -333
  334. package/.agent/workflows/worktree.md +0 -477
@@ -1,1629 +0,0 @@
1
- #!/bin/bash
2
- # =============================================================================
3
- # Generate OpenCode Commands from Agent Files
4
- # =============================================================================
5
- # Creates /commands in OpenCode from agent markdown files
6
- #
7
- # Source: ~/.aidevops/agents/
8
- # Target: ~/.config/opencode/command/
9
- #
10
- # Commands are generated from:
11
- # - build-agent/agent-review.md -> /agent-review
12
- # - workflows/*.md -> /workflow-name
13
- # - Other agents as needed
14
- # =============================================================================
15
-
16
- set -euo pipefail
17
-
18
- OPENCODE_COMMAND_DIR="$HOME/.config/opencode/command"
19
-
20
- # Colors
21
- GREEN='\033[0;32m'
22
- BLUE='\033[0;34m'
23
- NC='\033[0m'
24
-
25
- echo -e "${BLUE}Generating OpenCode commands...${NC}"
26
-
27
- # Ensure command directory exists
28
- mkdir -p "$OPENCODE_COMMAND_DIR"
29
-
30
- command_count=0
31
-
32
- # =============================================================================
33
- # AGENT-REVIEW COMMAND
34
- # =============================================================================
35
- # The agent-review command triggers a systematic review of agent instructions
36
-
37
- cat > "$OPENCODE_COMMAND_DIR/agent-review.md" << 'EOF'
38
- ---
39
- description: Systematic review and improvement of agent instructions
40
- agent: Build-Agent
41
- subtask: true
42
- ---
43
-
44
- Read ~/.aidevops/agents/build-agent/agent-review.md and follow its instructions.
45
-
46
- Review the agent file(s) specified: $ARGUMENTS
47
-
48
- If no specific file is provided, review the agents used in this session and propose improvements based on:
49
- 1. Any corrections the user made
50
- 2. Any commands or paths that failed
51
- 3. Instruction count (target <50 for main, <100 for subagents)
52
- 4. Universal applicability (>80% of tasks)
53
- 5. Duplicate detection across agents
54
-
55
- Follow the improvement proposal format from the agent-review instructions.
56
- EOF
57
- ((++command_count))
58
- echo -e " ${GREEN}✓${NC} Created /agent-review command"
59
-
60
- # =============================================================================
61
- # PREFLIGHT COMMAND
62
- # =============================================================================
63
- # Quality checks before version bump and release
64
-
65
- cat > "$OPENCODE_COMMAND_DIR/preflight.md" << 'EOF'
66
- ---
67
- description: Run quality checks before version bump and release
68
- agent: Build+
69
- subtask: true
70
- ---
71
-
72
- Read ~/.aidevops/agents/workflows/preflight.md and follow its instructions.
73
-
74
- Run preflight checks for: $ARGUMENTS
75
-
76
- This includes:
77
- 1. Code quality checks (ShellCheck, SonarCloud, secrets scan)
78
- 2. Markdown formatting validation
79
- 3. Version consistency verification
80
- 4. Git status check (clean working tree)
81
- EOF
82
- ((++command_count))
83
- echo -e " ${GREEN}✓${NC} Created /preflight command"
84
-
85
- # =============================================================================
86
- # POSTFLIGHT COMMAND
87
- # =============================================================================
88
- # Check code audit feedback on latest push to branch or PR
89
-
90
- cat > "$OPENCODE_COMMAND_DIR/postflight.md" << 'EOF'
91
- ---
92
- description: Check code audit feedback on latest push (branch or PR)
93
- agent: Build+
94
- subtask: true
95
- ---
96
-
97
- Check code audit tool feedback on the latest push.
98
-
99
- Target: $ARGUMENTS
100
-
101
- **Auto-detection:**
102
- 1. If on a feature branch with open PR → check that PR's feedback
103
- 2. If on a feature branch without PR → check branch CI status
104
- 3. If on main → check latest commit's CI/audit status
105
- 4. If no git context or ambiguous → ask user which branch/PR to check
106
-
107
- **Checks performed:**
108
- 1. GitHub Actions workflow status (pass/fail/pending)
109
- 2. CodeRabbit comments and suggestions
110
- 3. Codacy analysis results
111
- 4. SonarCloud quality gate status
112
- 5. Any blocking issues that need resolution
113
-
114
- **Commands used:**
115
- - `gh pr view --json reviews,comments` (if PR exists)
116
- - `gh run list --branch=<branch>` (CI status)
117
- - `gh api repos/{owner}/{repo}/commits/{sha}/check-runs` (detailed checks)
118
-
119
- Report findings and recommend next actions (fix issues, merge, etc.)
120
- EOF
121
- ((++command_count))
122
- echo -e " ${GREEN}✓${NC} Created /postflight command"
123
-
124
- # =============================================================================
125
- # RELEASE COMMAND
126
- # =============================================================================
127
- # Full release workflow - direct execution, no subagent needed
128
-
129
- cat > "$OPENCODE_COMMAND_DIR/release.md" << 'EOF'
130
- ---
131
- description: Full release workflow with version bump, tag, and GitHub release
132
- agent: Build+
133
- ---
134
-
135
- Execute a release for the current repository.
136
-
137
- Release type: $ARGUMENTS (valid: major, minor, patch)
138
-
139
- **Steps:**
140
- 1. Run `git log v$(cat VERSION 2>/dev/null || echo "0.0.0")..HEAD --oneline` to see commits since last release
141
- 2. If no release type provided, determine it from commits:
142
- - Any `feat:` or new feature → minor
143
- - Only `fix:`, `docs:`, `chore:`, `perf:`, `refactor:` → patch
144
- - Any `BREAKING CHANGE:` or `!` → major
145
- 3. Run the single release command:
146
- ```bash
147
- .agent/scripts/version-manager.sh release [type] --skip-preflight --force
148
- ```
149
- 4. Report the result with the GitHub release URL
150
-
151
- **CRITICAL**: Use only the single command above - it handles everything atomically.
152
- EOF
153
- ((++command_count))
154
- echo -e " ${GREEN}✓${NC} Created /release command"
155
-
156
- # =============================================================================
157
- # VERSION-BUMP COMMAND
158
- # =============================================================================
159
- # Version management
160
-
161
- cat > "$OPENCODE_COMMAND_DIR/version-bump.md" << 'EOF'
162
- ---
163
- description: Bump project version (major, minor, or patch)
164
- agent: Build+
165
- ---
166
-
167
- Read ~/.aidevops/agents/workflows/version-bump.md and follow its instructions.
168
-
169
- Bump type: $ARGUMENTS
170
-
171
- Valid types: major, minor, patch
172
-
173
- This updates:
174
- 1. VERSION file
175
- 2. package.json (if exists)
176
- 3. Other version references as configured
177
- EOF
178
- ((++command_count))
179
- echo -e " ${GREEN}✓${NC} Created /version-bump command"
180
-
181
- # =============================================================================
182
- # CHANGELOG COMMAND
183
- # =============================================================================
184
- # Changelog management
185
-
186
- cat > "$OPENCODE_COMMAND_DIR/changelog.md" << 'EOF'
187
- ---
188
- description: Update CHANGELOG.md following Keep a Changelog format
189
- agent: Build+
190
- ---
191
-
192
- Read ~/.aidevops/agents/workflows/changelog.md and follow its instructions.
193
-
194
- Action: $ARGUMENTS
195
-
196
- This maintains CHANGELOG.md with:
197
- - Unreleased section for pending changes
198
- - Version sections with dates
199
- - Categories: Added, Changed, Deprecated, Removed, Fixed, Security
200
- EOF
201
- ((++command_count))
202
- echo -e " ${GREEN}✓${NC} Created /changelog command"
203
-
204
- # =============================================================================
205
- # LINTERS-LOCAL COMMAND
206
- # =============================================================================
207
- # Run local linting tools (fast, offline)
208
-
209
- cat > "$OPENCODE_COMMAND_DIR/linters-local.md" << 'EOF'
210
- ---
211
- description: Run local linting tools (ShellCheck, secretlint, pattern checks)
212
- agent: Build+
213
- ---
214
-
215
- Run the local linters script:
216
-
217
- !`~/.aidevops/agents/scripts/linters-local.sh $ARGUMENTS`
218
-
219
- This runs fast, offline checks:
220
- 1. ShellCheck for shell scripts
221
- 2. Secretlint for exposed secrets
222
- 3. Pattern validation (return statements, positional parameters)
223
- 4. Markdown formatting checks
224
-
225
- For remote auditing (CodeRabbit, Codacy, SonarCloud), use /code-audit-remote
226
- EOF
227
- ((++command_count))
228
- echo -e " ${GREEN}✓${NC} Created /linters-local command"
229
-
230
- # =============================================================================
231
- # CODE-AUDIT-REMOTE COMMAND
232
- # =============================================================================
233
- # Run remote code auditing services
234
-
235
- cat > "$OPENCODE_COMMAND_DIR/code-audit-remote.md" << 'EOF'
236
- ---
237
- description: Run remote code auditing (CodeRabbit, Codacy, SonarCloud)
238
- agent: Build+
239
- subtask: true
240
- ---
241
-
242
- Read ~/.aidevops/agents/workflows/code-audit-remote.md and follow its instructions.
243
-
244
- Audit target: $ARGUMENTS
245
-
246
- This calls external quality services:
247
- 1. CodeRabbit - AI-powered code review
248
- 2. Codacy - Code quality analysis
249
- 3. SonarCloud - Security and maintainability
250
-
251
- For local linting (fast, offline), use /linters-local first
252
- EOF
253
- ((++command_count))
254
- echo -e " ${GREEN}✓${NC} Created /code-audit-remote command"
255
-
256
- # =============================================================================
257
- # CODE-STANDARDS COMMAND
258
- # =============================================================================
259
- # Check against documented code standards
260
-
261
- cat > "$OPENCODE_COMMAND_DIR/code-standards.md" << 'EOF'
262
- ---
263
- description: Check code against documented quality standards
264
- agent: Build+
265
- subtask: true
266
- ---
267
-
268
- Read ~/.aidevops/agents/tools/code-review/code-standards.md and follow its instructions.
269
-
270
- Check target: $ARGUMENTS
271
-
272
- This validates against our documented standards:
273
- - S7682: Explicit return statements
274
- - S7679: Positional parameters assigned to locals
275
- - S1192: Constants for repeated strings
276
- - S1481: No unused variables
277
- - ShellCheck: Zero violations
278
- EOF
279
- ((++command_count))
280
- echo -e " ${GREEN}✓${NC} Created /code-standards command"
281
-
282
- # =============================================================================
283
- # BRANCH COMMANDS
284
- # =============================================================================
285
- # Git branch workflows
286
-
287
- cat > "$OPENCODE_COMMAND_DIR/feature.md" << 'EOF'
288
- ---
289
- description: Create and develop a feature branch
290
- agent: Build+
291
- ---
292
-
293
- Read ~/.aidevops/agents/workflows/branch/feature.md and follow its instructions.
294
-
295
- Feature: $ARGUMENTS
296
-
297
- This will:
298
- 1. Create feature branch from main
299
- 2. Set up development environment
300
- 3. Guide feature implementation
301
- EOF
302
- ((++command_count))
303
- echo -e " ${GREEN}✓${NC} Created /feature command"
304
-
305
- cat > "$OPENCODE_COMMAND_DIR/bugfix.md" << 'EOF'
306
- ---
307
- description: Create and resolve a bugfix branch
308
- agent: Build+
309
- ---
310
-
311
- Read ~/.aidevops/agents/workflows/branch/bugfix.md and follow its instructions.
312
-
313
- Bug: $ARGUMENTS
314
-
315
- This will:
316
- 1. Create bugfix branch
317
- 2. Guide bug investigation
318
- 3. Implement and test fix
319
- EOF
320
- ((++command_count))
321
- echo -e " ${GREEN}✓${NC} Created /bugfix command"
322
-
323
- cat > "$OPENCODE_COMMAND_DIR/hotfix.md" << 'EOF'
324
- ---
325
- description: Urgent hotfix for critical production issues
326
- agent: Build+
327
- ---
328
-
329
- Read ~/.aidevops/agents/workflows/branch/hotfix.md and follow its instructions.
330
-
331
- Issue: $ARGUMENTS
332
-
333
- This will:
334
- 1. Create hotfix branch from main/production
335
- 2. Implement minimal fix
336
- 3. Fast-track to release
337
- EOF
338
- ((++command_count))
339
- echo -e " ${GREEN}✓${NC} Created /hotfix command"
340
-
341
- # =============================================================================
342
- # LIST-KEYS COMMAND
343
- # =============================================================================
344
- # List all API keys available in session
345
-
346
- cat > "$OPENCODE_COMMAND_DIR/list-keys.md" << 'EOF'
347
- ---
348
- description: List all API keys available in session with their storage locations
349
- agent: Build+
350
- ---
351
-
352
- Run the list-keys helper script and format the output as a markdown table:
353
-
354
- !`~/.aidevops/agents/scripts/list-keys-helper.sh --json $ARGUMENTS`
355
-
356
- Parse the JSON output and present as markdown tables grouped by source.
357
-
358
- Format with padded columns for readability:
359
-
360
- ```
361
- ### ~/.config/aidevops/mcp-env.sh
362
-
363
- | Key | Status |
364
- |----------------------------|---------------|
365
- | OPENAI_API_KEY | ✓ loaded |
366
- | ANTHROPIC_API_KEY | ✓ loaded |
367
- | TEST_KEY | ⚠ placeholder |
368
- ```
369
-
370
- Status icons:
371
- - ✓ loaded
372
- - ⚠ placeholder (needs real value)
373
- - ✗ not loaded
374
- - ℹ configured
375
-
376
- Pad key names to align columns. End with total count.
377
-
378
- Security: Key values are NEVER displayed.
379
- EOF
380
- ((++command_count))
381
- echo -e " ${GREEN}✓${NC} Created /list-keys command"
382
-
383
- # =============================================================================
384
- # LOG-TIME-SPENT COMMAND
385
- # =============================================================================
386
- # Manual time logging for tasks
387
-
388
- cat > "$OPENCODE_COMMAND_DIR/log-time-spent.md" << 'EOF'
389
- ---
390
- description: Log time spent on a task in TODO.md
391
- agent: Build+
392
- ---
393
-
394
- Log time spent on a task.
395
-
396
- Arguments: $ARGUMENTS
397
-
398
- **Format:** `/log-time-spent [task-id-or-description] [duration]`
399
-
400
- **Examples:**
401
- - `/log-time-spent "Add user dashboard" 2h30m`
402
- - `/log-time-spent t001 45m`
403
- - `/log-time-spent` (prompts for task and duration)
404
-
405
- **Workflow:**
406
- 1. If no arguments, show in-progress tasks from TODO.md and ask which one
407
- 2. Parse duration (supports: 2h, 30m, 2h30m, 1.5h)
408
- 3. Update the task's `logged:` field with current timestamp
409
- 4. If task has `started:` but no `actual:`, calculate running total
410
- 5. Show updated task with time summary
411
-
412
- **Duration formats:**
413
- - `2h` - 2 hours
414
- - `30m` - 30 minutes
415
- - `2h30m` - 2 hours 30 minutes
416
- - `1.5h` - 1.5 hours (converted to 1h30m)
417
-
418
- **Task update:**
419
- ```markdown
420
- # Before
421
- - [ ] Add user dashboard #feature ~4h started:2025-01-15T10:30Z
422
-
423
- # After (adds logged: with cumulative time)
424
- - [ ] Add user dashboard #feature ~4h started:2025-01-15T10:30Z logged:2h30m
425
- ```
426
-
427
- When task is completed, the `actual:` field is calculated from all logged time.
428
- EOF
429
- ((++command_count))
430
- echo -e " ${GREEN}✓${NC} Created /log-time-spent command"
431
-
432
- # =============================================================================
433
- # CONTEXT BUILDER COMMAND
434
- # =============================================================================
435
- # Token-efficient context generation
436
-
437
- cat > "$OPENCODE_COMMAND_DIR/context.md" << 'EOF'
438
- ---
439
- description: Build token-efficient AI context for complex tasks
440
- agent: Build+
441
- subtask: true
442
- ---
443
-
444
- Read ~/.aidevops/agents/tools/context/context-builder.md and follow its instructions.
445
-
446
- Context request: $ARGUMENTS
447
-
448
- This generates optimized context for AI assistants including:
449
- 1. Relevant code snippets
450
- 2. Architecture overview
451
- 3. Dependencies and relationships
452
- EOF
453
- ((++command_count))
454
- echo -e " ${GREEN}✓${NC} Created /context command"
455
-
456
- # =============================================================================
457
- # CREATE-PR COMMAND
458
- # =============================================================================
459
- # Create a PR from current branch with auto-generated title and description
460
-
461
- cat > "$OPENCODE_COMMAND_DIR/create-pr.md" << 'EOF'
462
- ---
463
- description: Create PR from current branch with title and description
464
- agent: Build+
465
- ---
466
-
467
- Create a pull request from the current branch.
468
-
469
- Additional context: $ARGUMENTS
470
-
471
- **Steps:**
472
- 1. Check current branch (must not be main/master)
473
- 2. Check for uncommitted changes (warn if present)
474
- 3. Push branch to remote if not already pushed
475
- 4. Generate PR title from branch name (e.g., `feature/add-login` → "Add login")
476
- 5. Generate PR description from:
477
- - Commit messages on this branch
478
- - Changed files summary
479
- - Any TODO.md/PLANS.md task references
480
- - User-provided context (if any)
481
- 6. Create PR using `gh pr create`
482
- 7. Return PR URL
483
-
484
- **Example:**
485
- - `/create-pr` → Creates PR with auto-generated title/description
486
- - `/create-pr fixes authentication bug` → Adds context to description
487
- EOF
488
- ((++command_count))
489
- echo -e " ${GREEN}✓${NC} Created /create-pr command"
490
-
491
- # Keep /pr as alias pointing to /create-pr for discoverability
492
- cat > "$OPENCODE_COMMAND_DIR/pr.md" << 'EOF'
493
- ---
494
- description: Alias for /create-pr - Create PR from current branch
495
- agent: Build+
496
- ---
497
-
498
- This is an alias for /create-pr. Creating PR from current branch.
499
-
500
- Context: $ARGUMENTS
501
-
502
- Run /create-pr with the same arguments.
503
- EOF
504
- ((++command_count))
505
- echo -e " ${GREEN}✓${NC} Created /pr command (alias for /create-pr)"
506
-
507
- # =============================================================================
508
- # CREATE-PRD COMMAND
509
- # =============================================================================
510
- # Generate Product Requirements Document
511
-
512
- cat > "$OPENCODE_COMMAND_DIR/create-prd.md" << 'EOF'
513
- ---
514
- description: Generate a Product Requirements Document for a feature
515
- agent: Plan+
516
- ---
517
-
518
- Read ~/.aidevops/agents/workflows/plans.md and follow its PRD generation instructions.
519
-
520
- Feature to document: $ARGUMENTS
521
-
522
- **Workflow:**
523
- 1. Ask 3-5 clarifying questions with numbered options (1A, 2B format)
524
- 2. Generate PRD using template from ~/.aidevops/agents/templates/prd-template.md
525
- 3. Save to todo/tasks/prd-{feature-slug}.md
526
- 4. Offer to generate tasks with /generate-tasks
527
-
528
- **Question format:**
529
- ```
530
- 1. What is the primary goal?
531
- A. Option 1
532
- B. Option 2
533
- C. Option 3
534
-
535
- 2. Who is the target user?
536
- A. Option 1
537
- B. Option 2
538
- ```
539
-
540
- User can reply with "1A, 2B" or provide details.
541
- EOF
542
- ((++command_count))
543
- echo -e " ${GREEN}✓${NC} Created /create-prd command"
544
-
545
- # =============================================================================
546
- # GENERATE-TASKS COMMAND
547
- # =============================================================================
548
- # Generate task list from PRD
549
-
550
- cat > "$OPENCODE_COMMAND_DIR/generate-tasks.md" << 'EOF'
551
- ---
552
- description: Generate implementation tasks from a PRD
553
- agent: Plan+
554
- ---
555
-
556
- Read ~/.aidevops/agents/workflows/plans.md and follow its task generation instructions.
557
-
558
- PRD or feature: $ARGUMENTS
559
-
560
- **Workflow:**
561
- 1. If PRD file provided, read it
562
- 2. If feature name provided, look for todo/tasks/prd-{name}.md
563
- 3. Generate parent tasks (Phase 1) and present to user
564
- 4. Wait for user to say "Go"
565
- 5. Generate sub-tasks (Phase 2)
566
- 6. Save to todo/tasks/tasks-{feature-slug}.md
567
-
568
- **Task 0.0 is always:** Create feature branch
569
-
570
- **Output format:**
571
- ```markdown
572
- - [ ] 0.0 Create feature branch
573
- - [ ] 0.1 Create and checkout: `git checkout -b feature/{slug}`
574
-
575
- - [ ] 1.0 First major task
576
- - [ ] 1.1 Sub-task
577
- - [ ] 1.2 Sub-task
578
- ```
579
-
580
- Mark tasks complete by changing `- [ ]` to `- [x]` as work progresses.
581
- EOF
582
- ((++command_count))
583
- echo -e " ${GREEN}✓${NC} Created /generate-tasks command"
584
-
585
- # =============================================================================
586
- # LIST-TODO COMMAND
587
- # =============================================================================
588
- # List tasks and plans with sorting, filtering, and grouping
589
-
590
- cat > "$OPENCODE_COMMAND_DIR/list-todo.md" << 'EOF'
591
- ---
592
- description: List tasks and plans with sorting, filtering, and grouping
593
- agent: Plan+
594
- ---
595
-
596
- Read TODO.md and todo/PLANS.md and display tasks based on arguments.
597
-
598
- Arguments: $ARGUMENTS
599
-
600
- **Default (no args):** Show all pending tasks grouped by status (In Progress → Backlog)
601
-
602
- **Sorting options:**
603
- - `--priority` or `-p` - Sort by priority (high → medium → low)
604
- - `--estimate` or `-e` - Sort by time estimate (shortest first)
605
- - `--date` or `-d` - Sort by logged date (newest first)
606
- - `--alpha` or `-a` - Sort alphabetically
607
-
608
- **Filtering options:**
609
- - `--tag <tag>` or `-t <tag>` - Filter by tag (#seo, #security, etc.)
610
- - `--owner <name>` or `-o <name>` - Filter by assignee (@marcus, etc.)
611
- - `--status <status>` - Filter by status (pending, in-progress, done, plan)
612
- - `--estimate <range>` - Filter by estimate (e.g., "<2h", ">1d", "1h-4h")
613
-
614
- **Grouping options:**
615
- - `--group-by tag` or `-g tag` - Group by tag
616
- - `--group-by owner` or `-g owner` - Group by assignee
617
- - `--group-by status` or `-g status` - Group by status (default)
618
- - `--group-by estimate` or `-g estimate` - Group by size (small/medium/large)
619
-
620
- **Display options:**
621
- - `--plans` - Include full plan details from PLANS.md
622
- - `--done` - Include completed tasks
623
- - `--all` - Show everything (pending + done + plans)
624
- - `--compact` - One-line per task (no details)
625
- - `--limit <n>` - Limit results
626
-
627
- **Examples:**
628
-
629
- ```bash
630
- /list-todo # All pending, grouped by status
631
- /list-todo --priority # Sorted by priority
632
- /list-todo -t seo # Only #seo tasks
633
- /list-todo -o marcus -e # Marcus's tasks, shortest first
634
- /list-todo -g tag # Grouped by tag
635
- /list-todo --estimate "<2h" # Quick wins under 2 hours
636
- /list-todo --plans # Include plan details
637
- /list-todo --all --compact # Everything, one line each
638
- ```
639
-
640
- **Output format:**
641
-
642
- ```markdown
643
- ## In Progress (2)
644
-
645
- | Task | Est | Tags | Owner |
646
- |------|-----|------|-------|
647
- | Add CSV export | ~2h | #feature | @marcus |
648
- | Fix login bug | ~1h | #bugfix | - |
649
-
650
- ## Backlog (5)
651
-
652
- | Task | Est | Tags | Owner |
653
- |------|-----|------|-------|
654
- | Ahrefs MCP integration | ~2d | #seo | - |
655
- | ...
656
-
657
- ## Plans (1)
658
-
659
- ### aidevops-opencode Plugin
660
- **Status:** Planning (Phase 0/4)
661
- **Estimate:** ~2d
662
- **Next:** Phase 1: Core plugin structure
663
- ```
664
-
665
- After displaying, offer:
666
- 1. Work on a specific task (enter number or name)
667
- 2. Filter/sort differently
668
- 3. Done browsing
669
- EOF
670
- ((++command_count))
671
- echo -e " ${GREEN}✓${NC} Created /list-todo command"
672
-
673
- # =============================================================================
674
- # SAVE-TODO COMMAND
675
- # =============================================================================
676
- # Save current discussion as task or plan (auto-detects complexity)
677
-
678
- cat > "$OPENCODE_COMMAND_DIR/save-todo.md" << 'EOF'
679
- ---
680
- description: Save current discussion as task or plan (auto-detects complexity)
681
- agent: Plan+
682
- ---
683
-
684
- Analyze the current conversation and save appropriately based on complexity.
685
-
686
- Topic/context: $ARGUMENTS
687
-
688
- ## Auto-Detection
689
-
690
- | Signal | Action |
691
- |--------|--------|
692
- | Single action, < 2h | TODO.md only |
693
- | User says "quick/simple" | TODO.md only |
694
- | Multiple steps, > 2h | PLANS.md + TODO.md |
695
- | Research/design needed | PLANS.md + TODO.md |
696
-
697
- ## Workflow
698
-
699
- 1. Extract from conversation: title, description, estimate, tags, context
700
- 2. Classify as Simple or Complex
701
- 3. Save with confirmation (numbered options for override)
702
-
703
- **Simple (TODO.md):**
704
- ```
705
- Saving to TODO.md: "{title}" ~{estimate}
706
- 1. Confirm
707
- 2. Add more details
708
- 3. Create full plan instead
709
- ```
710
-
711
- **Complex (PLANS.md + TODO.md):**
712
- ```
713
- Creating execution plan: "{title}" ~{estimate}
714
- 1. Confirm and create
715
- 2. Simplify to TODO.md only
716
- 3. Add more context first
717
- ```
718
-
719
- After save, respond:
720
- ```
721
- Saved: "{title}" to {location} (~{estimate})
722
- Start anytime with: "Let's work on {title}"
723
- ```
724
-
725
- ## Context Preservation
726
-
727
- Capture from conversation:
728
- - Decisions and rationale
729
- - Research findings
730
- - Constraints identified
731
- - Open questions
732
- - Related links
733
-
734
- This goes into PLANS.md "Context from Discussion" section.
735
- EOF
736
- ((++command_count))
737
- echo -e " ${GREEN}✓${NC} Created /save-todo command"
738
-
739
- # =============================================================================
740
- # PLAN-STATUS COMMAND
741
- # =============================================================================
742
- # Show active plans and TODO.md status
743
-
744
- cat > "$OPENCODE_COMMAND_DIR/plan-status.md" << 'EOF'
745
- ---
746
- description: Show active plans and TODO.md status
747
- agent: Plan+
748
- ---
749
-
750
- Read TODO.md and todo/PLANS.md to show current planning status.
751
-
752
- Filter: $ARGUMENTS (optional: "in-progress", "backlog", plan name)
753
-
754
- **Output format:**
755
-
756
- ## TODO.md
757
-
758
- ### In Progress
759
- - [ ] Task 1 @owner #tag ~estimate
760
-
761
- ### Backlog (top 5)
762
- - [ ] Task 2 #tag
763
- - [ ] Task 3 #tag
764
-
765
- ## Active Plans (todo/PLANS.md)
766
-
767
- ### Plan Name
768
- **Status:** In Progress (Phase 2/4)
769
- **Progress:** 3/7 tasks complete
770
- **Next:** Task description
771
-
772
- ---
773
-
774
- Offer options:
775
- 1. Work on a specific task/plan
776
- 2. Add new task to TODO.md
777
- 3. Create new execution plan
778
- EOF
779
- ((++command_count))
780
- echo -e " ${GREEN}✓${NC} Created /plan-status command"
781
-
782
- # =============================================================================
783
- # KEYWORD RESEARCH COMMAND
784
- # =============================================================================
785
- # Basic keyword expansion from seed keywords
786
-
787
- cat > "$OPENCODE_COMMAND_DIR/keyword-research.md" << 'EOF'
788
- ---
789
- description: Keyword research with seed keyword expansion
790
- agent: SEO
791
- ---
792
-
793
- Read ~/.aidevops/agents/seo/keyword-research.md and follow its instructions.
794
-
795
- Keywords to research: $ARGUMENTS
796
-
797
- **Workflow:**
798
- 1. If no locale preference saved, prompt user to select (US/English default)
799
- 2. Call the keyword research helper or DataForSEO MCP directly
800
- 3. Return first 100 results in markdown table format
801
- 4. Ask if user needs more results (up to 10,000)
802
- 5. Offer CSV export option
803
-
804
- **Output format:**
805
- ```
806
- | Keyword | Volume | CPC | KD | Intent |
807
- |--------------------------|---------|--------|-----|--------------|
808
- | best seo tools 2025 | 12,100 | $4.50 | 45 | Commercial |
809
- ```
810
-
811
- **Options from arguments:**
812
- - `--provider dataforseo|serper|both`
813
- - `--locale us-en|uk-en|etc`
814
- - `--limit N`
815
- - `--csv` - Export to ~/Downloads/
816
- - `--min-volume N`, `--max-difficulty N`, `--intent type`
817
- - `--contains "term"`, `--excludes "term"`
818
-
819
- Wildcards supported: "best * for dogs" expands to variations.
820
- EOF
821
- ((++command_count))
822
- echo -e " ${GREEN}✓${NC} Created /keyword-research command"
823
-
824
- # =============================================================================
825
- # AUTOCOMPLETE RESEARCH COMMAND
826
- # =============================================================================
827
- # Google autocomplete long-tail expansion
828
-
829
- cat > "$OPENCODE_COMMAND_DIR/autocomplete-research.md" << 'EOF'
830
- ---
831
- description: Google autocomplete long-tail keyword expansion
832
- agent: SEO
833
- ---
834
-
835
- Read ~/.aidevops/agents/seo/keyword-research.md and follow its instructions.
836
-
837
- Seed keyword for autocomplete: $ARGUMENTS
838
-
839
- **Workflow:**
840
- 1. Use DataForSEO or Serper autocomplete API
841
- 2. Return all autocomplete suggestions
842
- 3. Display in markdown table format
843
- 4. Offer CSV export option
844
-
845
- **Output format:**
846
- ```
847
- | Keyword | Volume | CPC | KD | Intent |
848
- |-----------------------------------|---------|--------|-----|--------------|
849
- | how to lose weight fast | 8,100 | $2.10 | 42 | Informational|
850
- | how to lose weight in a week | 5,400 | $1.80 | 38 | Informational|
851
- ```
852
-
853
- **Options:**
854
- - `--provider dataforseo|serper|both`
855
- - `--locale us-en|uk-en|etc`
856
- - `--csv` - Export to ~/Downloads/
857
-
858
- This is ideal for discovering question-based and long-tail keywords.
859
- EOF
860
- ((++command_count))
861
- echo -e " ${GREEN}✓${NC} Created /autocomplete-research command"
862
-
863
- # =============================================================================
864
- # KEYWORD RESEARCH EXTENDED COMMAND
865
- # =============================================================================
866
- # Full SERP analysis with weakness detection and KeywordScore
867
-
868
- cat > "$OPENCODE_COMMAND_DIR/keyword-research-extended.md" << 'EOF'
869
- ---
870
- description: Full SERP analysis with weakness detection and KeywordScore
871
- agent: SEO
872
- subtask: true
873
- ---
874
-
875
- Read ~/.aidevops/agents/seo/keyword-research.md and follow its instructions.
876
-
877
- Research target: $ARGUMENTS
878
-
879
- **Modes (from arguments):**
880
- - Default: Full SERP analysis on keywords
881
- - `--domain example.com` - Keywords associated with domain's niche
882
- - `--competitor example.com` - Exact keywords competitor ranks for
883
- - `--gap yourdomain.com,competitor.com` - Keywords they have that you don't
884
-
885
- **Analysis levels:**
886
- - `--full` (default): Complete SERP analysis with 17 weaknesses + KeywordScore
887
- - `--quick`: Basic metrics only (Volume, CPC, KD, Intent) - faster, cheaper
888
-
889
- **Additional options:**
890
- - `--ahrefs` - Include Ahrefs DR/UR metrics
891
- - `--provider dataforseo|serper|both`
892
- - `--limit N` (default 100, max 10,000)
893
- - `--csv` - Export to ~/Downloads/
894
-
895
- **Extended output format:**
896
- ```
897
- | Keyword | Vol | KD | KS | Weaknesses | Weakness Types | DS | PS |
898
- |-----------------|--------|-----|-----|------------|----------------------------------|-----|-----|
899
- | best seo tools | 12.1K | 45 | 72 | 5 | Low DS, Old Content, No HTTPS... | 23 | 15 |
900
- ```
901
-
902
- **Competitor/Gap output format:**
903
- ```
904
- | Keyword | Vol | KD | Position | Est Traffic | Ranking URL |
905
- |-----------------|--------|-----|----------|-------------|--------------------------------|
906
- | best seo tools | 12.1K | 45 | 3 | 2,450 | example.com/blog/seo-tools |
907
- ```
908
-
909
- **KeywordScore (0-100):**
910
- - 90-100: Exceptional opportunity
911
- - 70-89: Strong opportunity
912
- - 50-69: Moderate opportunity
913
- - 30-49: Challenging
914
- - 0-29: Very difficult
915
-
916
- **17 SERP Weaknesses detected:**
917
- Domain: Low DS, Low PS, No Backlinks
918
- Technical: Slow Page, High Spam, Non-HTTPS, Broken, Flash, Frames, Non-Canonical
919
- Content: Old Content, Title Mismatch, No Keyword in Headings, No Headings, Unmatched Intent
920
- SERP: UGC-Heavy Results
921
- EOF
922
- ((++command_count))
923
- echo -e " ${GREEN}✓${NC} Created /keyword-research-extended command"
924
-
925
- # =============================================================================
926
- # WEBMASTER KEYWORDS COMMAND
927
- # =============================================================================
928
- # Keywords from Google Search Console and Bing Webmaster Tools
929
-
930
- cat > "$OPENCODE_COMMAND_DIR/webmaster-keywords.md" << 'EOF'
931
- ---
932
- description: Keywords from GSC + Bing for your verified sites
933
- agent: SEO
934
- ---
935
-
936
- Read ~/.aidevops/agents/seo/keyword-research.md and follow its instructions.
937
-
938
- Site URL: $ARGUMENTS
939
-
940
- **Workflow:**
941
- 1. List verified sites if no URL provided: `keyword-research-helper.sh sites`
942
- 2. Fetch keywords from Google Search Console
943
- 3. Fetch keywords from Bing Webmaster Tools
944
- 4. Combine and deduplicate results
945
- 5. Enrich with DataForSEO volume/difficulty data (unless --no-enrich)
946
- 6. Display in markdown table format
947
-
948
- **Output format:**
949
- ```
950
- | Keyword | Clicks | Impressions | CTR | Position | Volume | KD | CPC | Sources |
951
- |--------------------------|--------|-------------|-------|----------|--------|----|----- |----------|
952
- | best seo tools | 245 | 8,100 | 3.02% | 4.2 | 12,100 | 45 | 4.50 | GSC+Bing |
953
- | keyword research tips | 128 | 3,400 | 3.76% | 6.8 | 2,400 | 32 | 2.10 | GSC |
954
- ```
955
-
956
- **Options:**
957
- - `--days N` - Days of data (default: 30)
958
- - `--limit N` - Number of results (default: 100)
959
- - `--no-enrich` - Skip DataForSEO enrichment (faster, no credits)
960
- - `--csv` - Export to ~/Downloads/
961
-
962
- **Commands:**
963
- ```bash
964
- # List verified sites
965
- keyword-research-helper.sh sites
966
-
967
- # Get keywords for a site
968
- keyword-research-helper.sh webmaster https://example.com
969
-
970
- # Last 90 days, no enrichment
971
- keyword-research-helper.sh webmaster https://example.com --days 90 --no-enrich
972
- ```
973
-
974
- **Use cases:**
975
- 1. Find high-impression, low-CTR keywords to optimize
976
- 2. Track ranking changes over time
977
- 3. Discover keywords you're ranking for but not targeting
978
- 4. Compare Google vs Bing performance
979
- EOF
980
- ((++command_count))
981
- echo -e " ${GREEN}✓${NC} Created /webmaster-keywords command"
982
-
983
- # =============================================================================
984
- # ONBOARDING COMMAND
985
- # =============================================================================
986
- # Interactive setup wizard for new users
987
-
988
- cat > "$OPENCODE_COMMAND_DIR/onboarding.md" << 'EOF'
989
- ---
990
- description: Interactive onboarding wizard - discover services, configure integrations
991
- agent: AI-DevOps
992
- ---
993
-
994
- Read ~/.aidevops/agents/onboarding.md and follow its instructions.
995
-
996
- This is the recommended starting point for new aidevops users.
997
-
998
- **Workflow:**
999
-
1000
- 1. **Welcome**: Ask if user wants an explanation of aidevops capabilities
1001
-
1002
- 2. **Understand needs**: Ask what kind of work they do:
1003
- - Web development (WordPress, React, Node.js)
1004
- - DevOps & infrastructure management
1005
- - SEO & content marketing
1006
- - Multiple client/site management
1007
- - Something else
1008
-
1009
- 3. **Show status**: Run the status check and display results:
1010
- ```bash
1011
- ~/.aidevops/agents/scripts/onboarding-helper.sh status
1012
- ```
1013
-
1014
- 4. **Personalized recommendations**: Based on their work type:
1015
- ```bash
1016
- ~/.aidevops/agents/scripts/onboarding-helper.sh recommend [type]
1017
- ```
1018
-
1019
- 5. **Guide setup**: For each service they want to configure:
1020
- - Explain what it does
1021
- - Provide signup/API key link
1022
- - Show the setup command
1023
- - Verify it works
1024
-
1025
- 6. **Next steps**: Suggest trying a simple task to verify everything works
1026
-
1027
- **Quick status check only:**
1028
- ```bash
1029
- ~/.aidevops/agents/scripts/onboarding-helper.sh status
1030
- ```
1031
-
1032
- Arguments: $ARGUMENTS
1033
- EOF
1034
- ((++command_count))
1035
- echo -e " ${GREEN}✓${NC} Created /onboarding command"
1036
-
1037
- # =============================================================================
1038
- # SETUP-AIDEVOPS COMMAND
1039
- # =============================================================================
1040
- # Run setup.sh to deploy latest agent changes locally
1041
-
1042
- cat > "$OPENCODE_COMMAND_DIR/setup-aidevops.md" << 'EOF'
1043
- ---
1044
- description: Deploy latest aidevops agent changes locally
1045
- agent: Build+
1046
- ---
1047
-
1048
- Run the aidevops setup script to deploy the latest changes.
1049
-
1050
- **Command:**
1051
- ```bash
1052
- cd ~/Git/aidevops && ./setup.sh || exit
1053
- ```
1054
-
1055
- **What this does:**
1056
- 1. Deploys agents to ~/.aidevops/agents/
1057
- 2. Updates OpenCode commands in ~/.config/opencode/command/
1058
- 3. Regenerates agent configurations
1059
- 4. Copies VERSION file for version checks
1060
-
1061
- **After setup completes:**
1062
- - Restart OpenCode to load new commands and config
1063
- - New/updated commands will be available
1064
-
1065
- Arguments: $ARGUMENTS
1066
- EOF
1067
- ((++command_count))
1068
- echo -e " ${GREEN}✓${NC} Created /setup-aidevops command"
1069
-
1070
- # =============================================================================
1071
- # RALPH-LOOP COMMAND
1072
- # =============================================================================
1073
- # Start iterative AI development loop (Ralph Wiggum technique)
1074
-
1075
- cat > "$OPENCODE_COMMAND_DIR/ralph-loop.md" << 'EOF'
1076
- ---
1077
- description: Start iterative AI development loop (Ralph Wiggum technique)
1078
- agent: Build+
1079
- ---
1080
-
1081
- Read ~/.aidevops/agents/workflows/ralph-loop.md and follow its instructions.
1082
-
1083
- Start a Ralph loop for iterative development.
1084
-
1085
- Arguments: $ARGUMENTS
1086
-
1087
- **Usage:**
1088
- ```bash
1089
- /ralph-loop "<prompt>" --max-iterations <n> --completion-promise "<text>"
1090
- ```
1091
-
1092
- **Options:**
1093
- - `--max-iterations <n>` - Stop after N iterations (default: unlimited)
1094
- - `--completion-promise <text>` - Phrase that signals completion
1095
-
1096
- **Setup the loop:**
1097
- ```bash
1098
- ~/.aidevops/agents/scripts/ralph-loop-helper.sh setup $ARGUMENTS
1099
- ```
1100
-
1101
- **How it works:**
1102
- 1. You work on the task
1103
- 2. When you try to exit, the SAME prompt is fed back
1104
- 3. You see your previous work in files and git history
1105
- 4. Iterate until completion or max iterations
1106
-
1107
- **Completion:**
1108
- To signal completion, output: `<promise>YOUR_PHRASE</promise>`
1109
- The promise must be TRUE - do not output false promises to escape.
1110
-
1111
- **Examples:**
1112
- ```bash
1113
- /ralph-loop "Build a REST API for todos" --max-iterations 20 --completion-promise "DONE"
1114
- /ralph-loop "Fix all TypeScript errors" --completion-promise "ALL_FIXED" --max-iterations 10
1115
- ```
1116
- EOF
1117
- ((++command_count))
1118
- echo -e " ${GREEN}✓${NC} Created /ralph-loop command"
1119
-
1120
- # =============================================================================
1121
- # CANCEL-RALPH COMMAND
1122
- # =============================================================================
1123
- # Cancel active Ralph loop
1124
-
1125
- cat > "$OPENCODE_COMMAND_DIR/cancel-ralph.md" << 'EOF'
1126
- ---
1127
- description: Cancel active Ralph Wiggum loop
1128
- agent: Build+
1129
- ---
1130
-
1131
- Cancel the active Ralph loop.
1132
-
1133
- **Check and cancel:**
1134
- ```bash
1135
- ~/.aidevops/agents/scripts/ralph-loop-helper.sh cancel
1136
- ```
1137
-
1138
- This removes the state file at `.agent/loop-state/ralph-loop.local.md` and stops the loop.
1139
-
1140
- If no loop is active, it will report "No active Ralph loop found."
1141
- EOF
1142
- ((++command_count))
1143
- echo -e " ${GREEN}✓${NC} Created /cancel-ralph command"
1144
-
1145
- # =============================================================================
1146
- # RALPH-STATUS COMMAND
1147
- # =============================================================================
1148
- # Show Ralph loop status
1149
-
1150
- cat > "$OPENCODE_COMMAND_DIR/ralph-status.md" << 'EOF'
1151
- ---
1152
- description: Show current Ralph loop status
1153
- agent: Build+
1154
- ---
1155
-
1156
- Show the current Ralph loop status.
1157
-
1158
- **Check status:**
1159
- ```bash
1160
- ~/.aidevops/agents/scripts/ralph-loop-helper.sh status
1161
- ```
1162
-
1163
- This shows:
1164
- - Whether a loop is active
1165
- - Current iteration number
1166
- - Max iterations setting
1167
- - Completion promise (if set)
1168
- - When the loop started
1169
- EOF
1170
- ((++command_count))
1171
- echo -e " ${GREEN}✓${NC} Created /ralph-status command"
1172
-
1173
- # =============================================================================
1174
- # PREFLIGHT-LOOP COMMAND
1175
- # =============================================================================
1176
- # Iterative preflight checks until all pass
1177
-
1178
- cat > "$OPENCODE_COMMAND_DIR/preflight-loop.md" << 'EOF'
1179
- ---
1180
- description: Run preflight checks in a loop until all pass (Ralph pattern)
1181
- agent: Build+
1182
- ---
1183
-
1184
- Run preflight checks iteratively until all pass or max iterations reached.
1185
-
1186
- Arguments: $ARGUMENTS
1187
-
1188
- **Usage:**
1189
- ```bash
1190
- /preflight-loop [--auto-fix] [--max-iterations N]
1191
- ```
1192
-
1193
- **Options:**
1194
- - `--auto-fix` - Attempt to automatically fix issues
1195
- - `--max-iterations N` - Max iterations (default: 10)
1196
-
1197
- **Run the loop:**
1198
- ```bash
1199
- ~/.aidevops/agents/scripts/quality-loop-helper.sh preflight $ARGUMENTS
1200
- ```
1201
-
1202
- **Completion promise:** `<promise>PREFLIGHT_PASS</promise>`
1203
-
1204
- This applies the Ralph Wiggum technique to quality checks:
1205
- 1. Run all preflight checks
1206
- 2. If failures and --auto-fix: attempt fixes
1207
- 3. Re-run checks
1208
- 4. Repeat until all pass or max iterations
1209
-
1210
- **Examples:**
1211
- ```bash
1212
- /preflight-loop --auto-fix --max-iterations 5
1213
- /preflight-loop # Manual fixes between iterations
1214
- ```
1215
- EOF
1216
- ((++command_count))
1217
- echo -e " ${GREEN}✓${NC} Created /preflight-loop command"
1218
-
1219
- # =============================================================================
1220
- # PR-LOOP COMMAND
1221
- # =============================================================================
1222
- # Iterative PR review monitoring
1223
-
1224
- cat > "$OPENCODE_COMMAND_DIR/pr-loop.md" << 'EOF'
1225
- ---
1226
- description: Monitor PR until approved or merged (Ralph pattern)
1227
- agent: Build+
1228
- ---
1229
-
1230
- Monitor a PR iteratively until approved, merged, or max iterations reached.
1231
-
1232
- Arguments: $ARGUMENTS
1233
-
1234
- **Usage:**
1235
- ```bash
1236
- /pr-loop [--pr NUMBER] [--wait-for-ci] [--max-iterations N]
1237
- ```
1238
-
1239
- **Options:**
1240
- - `--pr NUMBER` - PR number (auto-detected if not provided)
1241
- - `--wait-for-ci` - Wait for CI checks to complete
1242
- - `--max-iterations N` - Max iterations (default: 10)
1243
-
1244
- **Run the loop:**
1245
- ```bash
1246
- ~/.aidevops/agents/scripts/quality-loop-helper.sh pr-review $ARGUMENTS
1247
- ```
1248
-
1249
- **Completion promises:**
1250
- - `<promise>PR_APPROVED</promise>` - PR approved and ready to merge
1251
- - `<promise>PR_MERGED</promise>` - PR has been merged
1252
-
1253
- **Workflow:**
1254
- 1. Check PR status (CI, reviews, mergeable)
1255
- 2. If changes requested: get feedback, apply fixes, push
1256
- 3. If CI failed: get annotations, fix issues, push
1257
- 4. If pending: wait and re-check
1258
- 5. Repeat until approved/merged or max iterations
1259
-
1260
- **Examples:**
1261
- ```bash
1262
- /pr-loop --wait-for-ci
1263
- /pr-loop --pr 123 --max-iterations 20
1264
- ```
1265
- EOF
1266
- ((++command_count))
1267
- echo -e " ${GREEN}✓${NC} Created /pr-loop command"
1268
-
1269
- # =============================================================================
1270
- # POSTFLIGHT-LOOP COMMAND
1271
- # =============================================================================
1272
- # Release health monitoring
1273
-
1274
- cat > "$OPENCODE_COMMAND_DIR/postflight-loop.md" << 'EOF'
1275
- ---
1276
- description: Monitor release health after deployment (Ralph pattern)
1277
- agent: Build+
1278
- ---
1279
-
1280
- Monitor release health for a specified duration.
1281
-
1282
- Arguments: $ARGUMENTS
1283
-
1284
- **Usage:**
1285
- ```bash
1286
- /postflight-loop [--monitor-duration Nm] [--max-iterations N]
1287
- ```
1288
-
1289
- **Options:**
1290
- - `--monitor-duration Nm` - How long to monitor (e.g., 5m, 10m, 1h)
1291
- - `--max-iterations N` - Max checks during monitoring (default: 5)
1292
-
1293
- **Run the loop:**
1294
- ```bash
1295
- ~/.aidevops/agents/scripts/quality-loop-helper.sh postflight $ARGUMENTS
1296
- ```
1297
-
1298
- **Completion promise:** `<promise>RELEASE_HEALTHY</promise>`
1299
-
1300
- **Checks performed:**
1301
- 1. Latest CI workflow status
1302
- 2. Release tag exists
1303
- 3. Version consistency (VERSION file matches release)
1304
-
1305
- **Examples:**
1306
- ```bash
1307
- /postflight-loop --monitor-duration 10m
1308
- /postflight-loop --monitor-duration 1h --max-iterations 10
1309
- ```
1310
- EOF
1311
- ((++command_count))
1312
- echo -e " ${GREEN}✓${NC} Created /postflight-loop command"
1313
-
1314
- # =============================================================================
1315
- # RALPH-TASK COMMAND
1316
- # =============================================================================
1317
- # Run a Ralph loop for a specific task ID
1318
-
1319
- cat > "$OPENCODE_COMMAND_DIR/ralph-task.md" << 'EOF'
1320
- ---
1321
- description: Run Ralph loop for a task from TODO.md by ID
1322
- agent: Build+
1323
- ---
1324
-
1325
- Run a Ralph loop for a specific task from TODO.md.
1326
-
1327
- Task ID: $ARGUMENTS
1328
-
1329
- **Workflow:**
1330
- 1. Find task in TODO.md by ID (e.g., t042)
1331
- 2. Extract ralph metadata (promise, verify command, max iterations)
1332
- 3. Start Ralph loop with extracted parameters
1333
-
1334
- **Task format in TODO.md:**
1335
- ```markdown
1336
- - [ ] t042 Fix all ShellCheck violations #ralph ~2h
1337
- ralph-promise: "SHELLCHECK_CLEAN"
1338
- ralph-verify: "shellcheck .agent/scripts/*.sh"
1339
- ralph-max: 10
1340
- ```
1341
-
1342
- **Or shorthand:**
1343
- ```markdown
1344
- - [ ] t042 Fix all ShellCheck violations #ralph(SHELLCHECK_CLEAN) ~2h
1345
- ```
1346
-
1347
- **Usage:**
1348
- ```bash
1349
- /ralph-task t042
1350
- ```
1351
-
1352
- This will:
1353
- 1. Read TODO.md and find task t042
1354
- 2. Extract the ralph-promise, ralph-verify, ralph-max values
1355
- 3. Start: `/ralph-loop "{task description}" --completion-promise "{promise}" --max-iterations {max}`
1356
-
1357
- **Requirements:**
1358
- - Task must have `#ralph` tag
1359
- - Task should have completion criteria defined
1360
- EOF
1361
- ((++command_count))
1362
- echo -e " ${GREEN}✓${NC} Created /ralph-task command"
1363
-
1364
- # =============================================================================
1365
- # FULL-LOOP COMMAND
1366
- # =============================================================================
1367
- # End-to-end development loop (task → preflight → PR → postflight → deploy)
1368
-
1369
- cat > "$OPENCODE_COMMAND_DIR/full-loop.md" << 'EOF'
1370
- ---
1371
- description: Start end-to-end development loop (task → preflight → PR → postflight → deploy)
1372
- agent: Build+
1373
- ---
1374
-
1375
- Read ~/.aidevops/agents/scripts/commands/full-loop.md and follow its instructions.
1376
-
1377
- Start a full development loop for: $ARGUMENTS
1378
-
1379
- **Full Loop Phases:**
1380
- ```text
1381
- Task Development → Preflight → PR Create → PR Review → Postflight → Deploy
1382
- ```
1383
-
1384
- **Usage:**
1385
- ```bash
1386
- /full-loop "Implement feature X with tests"
1387
- /full-loop "Fix bug Y" --max-task-iterations 30
1388
- ```
1389
-
1390
- **Options:**
1391
- - `--max-task-iterations N` - Max iterations for task (default: 50)
1392
- - `--skip-preflight` - Skip preflight checks
1393
- - `--skip-postflight` - Skip postflight monitoring
1394
- - `--no-auto-pr` - Pause for manual PR creation
1395
-
1396
- **Completion promise:** `<promise>FULL_LOOP_COMPLETE</promise>`
1397
- EOF
1398
- ((++command_count))
1399
- echo -e " ${GREEN}✓${NC} Created /full-loop command"
1400
-
1401
- # =============================================================================
1402
- # CODE-SIMPLIFIER COMMAND
1403
- # =============================================================================
1404
- # Simplify and refine code for clarity
1405
-
1406
- cat > "$OPENCODE_COMMAND_DIR/code-simplifier.md" << 'EOF'
1407
- ---
1408
- description: Simplify and refine code for clarity, consistency, and maintainability
1409
- agent: Build+
1410
- ---
1411
-
1412
- Read ~/.aidevops/agents/tools/code-review/code-simplifier.md and follow its instructions.
1413
-
1414
- Target: $ARGUMENTS
1415
-
1416
- **Usage:**
1417
- ```bash
1418
- /code-simplifier # Simplify recently modified code
1419
- /code-simplifier src/ # Simplify code in specific directory
1420
- /code-simplifier --all # Review entire codebase (use sparingly)
1421
- ```
1422
-
1423
- **Key Principles:**
1424
- - Preserve exact functionality
1425
- - Clarity over brevity
1426
- - Avoid nested ternaries
1427
- - Remove obvious comments
1428
- - Apply project standards
1429
- EOF
1430
- ((++command_count))
1431
- echo -e " ${GREEN}✓${NC} Created /code-simplifier command"
1432
-
1433
- # =============================================================================
1434
- # SESSION-REVIEW COMMAND
1435
- # =============================================================================
1436
- # Review session for completeness before ending
1437
-
1438
- cat > "$OPENCODE_COMMAND_DIR/session-review.md" << 'EOF'
1439
- ---
1440
- description: Review session for completeness before ending
1441
- agent: Build+
1442
- ---
1443
-
1444
- Read ~/.aidevops/agents/scripts/commands/session-review.md and follow its instructions.
1445
-
1446
- Review the current session for: $ARGUMENTS
1447
-
1448
- **Checks performed:**
1449
- 1. All objectives completed
1450
- 2. Workflow best practices followed
1451
- 3. Knowledge captured for future sessions
1452
- 4. Clear next steps identified
1453
-
1454
- **Usage:**
1455
- ```bash
1456
- /session-review # Review current session
1457
- /session-review --capture # Also capture learnings to memory
1458
- ```
1459
- EOF
1460
- ((++command_count))
1461
- echo -e " ${GREEN}✓${NC} Created /session-review command"
1462
-
1463
- # =============================================================================
1464
- # REMEMBER COMMAND
1465
- # =============================================================================
1466
- # Store a memory for cross-session recall
1467
-
1468
- cat > "$OPENCODE_COMMAND_DIR/remember.md" << 'EOF'
1469
- ---
1470
- description: Store a memory for cross-session recall
1471
- agent: Build+
1472
- ---
1473
-
1474
- Read ~/.aidevops/agents/scripts/commands/remember.md and follow its instructions.
1475
-
1476
- Remember: $ARGUMENTS
1477
-
1478
- **Usage:**
1479
- ```bash
1480
- /remember "User prefers worktrees over checkout"
1481
- /remember "The auth module uses JWT with 24h expiry"
1482
- /remember --type WORKING_SOLUTION "Fixed by adding explicit return"
1483
- ```
1484
-
1485
- **Memory types:**
1486
- - WORKING_SOLUTION - Solutions that worked
1487
- - FAILED_APPROACH - Approaches that didn't work
1488
- - CODEBASE_PATTERN - Patterns in this codebase
1489
- - USER_PREFERENCE - User preferences
1490
- - TOOL_CONFIG - Tool configurations
1491
- - DECISION - Decisions made
1492
- - CONTEXT - General context
1493
-
1494
- **Storage:** ~/.aidevops/.agent-workspace/memory/memory.db
1495
- EOF
1496
- ((++command_count))
1497
- echo -e " ${GREEN}✓${NC} Created /remember command"
1498
-
1499
- # =============================================================================
1500
- # RECALL COMMAND
1501
- # =============================================================================
1502
- # Search memories from previous sessions
1503
-
1504
- cat > "$OPENCODE_COMMAND_DIR/recall.md" << 'EOF'
1505
- ---
1506
- description: Search memories from previous sessions
1507
- agent: Build+
1508
- ---
1509
-
1510
- Read ~/.aidevops/agents/scripts/commands/recall.md and follow its instructions.
1511
-
1512
- Search for: $ARGUMENTS
1513
-
1514
- **Usage:**
1515
- ```bash
1516
- /recall authentication # Search for auth-related memories
1517
- /recall --recent # Show 10 most recent memories
1518
- /recall --stats # Show memory statistics
1519
- /recall --type WORKING_SOLUTION # Filter by type
1520
- ```
1521
-
1522
- **Storage:** ~/.aidevops/.agent-workspace/memory/memory.db
1523
- EOF
1524
- ((++command_count))
1525
- echo -e " ${GREEN}✓${NC} Created /recall command"
1526
-
1527
- # =============================================================================
1528
- # AUTO-DISCOVERED COMMANDS FROM scripts/commands/
1529
- # =============================================================================
1530
- # Commands in .agent/scripts/commands/*.md are auto-generated
1531
- # Each file should have frontmatter with description and agent
1532
- # This prevents needing to manually add new commands to this script
1533
-
1534
- COMMANDS_DIR="$HOME/.aidevops/agents/scripts/commands"
1535
-
1536
- if [[ -d "$COMMANDS_DIR" ]]; then
1537
- for cmd_file in "$COMMANDS_DIR"/*.md; do
1538
- [[ -f "$cmd_file" ]] || continue
1539
-
1540
- cmd_name=$(basename "$cmd_file" .md)
1541
-
1542
- # Skip SKILL.md (not a command)
1543
- [[ "$cmd_name" == "SKILL" ]] && continue
1544
-
1545
- # Skip if already manually defined (avoid duplicates)
1546
- if [[ -f "$OPENCODE_COMMAND_DIR/$cmd_name.md" ]]; then
1547
- continue
1548
- fi
1549
-
1550
- # Copy command file directly (it already has proper frontmatter)
1551
- cp "$cmd_file" "$OPENCODE_COMMAND_DIR/$cmd_name.md"
1552
- ((++command_count))
1553
- echo -e " ${GREEN}✓${NC} Auto-discovered /$cmd_name command"
1554
- done
1555
- fi
1556
-
1557
- # =============================================================================
1558
- # SUMMARY
1559
- # =============================================================================
1560
-
1561
- echo ""
1562
- echo -e "${GREEN}Done!${NC}"
1563
- echo " Commands created: $command_count"
1564
- echo " Location: $OPENCODE_COMMAND_DIR"
1565
- echo ""
1566
- echo "Available commands:"
1567
- echo ""
1568
- echo " Planning:"
1569
- echo " /list-todo - List tasks with sorting, filtering, grouping"
1570
- echo " /save-todo - Save discussion as task/plan (auto-detects complexity)"
1571
- echo " /plan-status - Show active plans and TODO.md status"
1572
- echo " /create-prd - Generate Product Requirements Document"
1573
- echo " /generate-tasks - Generate implementation tasks from PRD"
1574
- echo ""
1575
- echo " Quality:"
1576
- echo " /preflight - Quality checks before commit"
1577
- echo " /postflight - Check code audit feedback on latest push"
1578
- echo " /linters-local - Run local linting (ShellCheck, secretlint)"
1579
- echo " /code-audit-remote - Run remote auditing (CodeRabbit, Codacy, SonarCloud)"
1580
- echo " /code-standards - Check against documented standards"
1581
- echo " /code-simplifier - Simplify code for clarity and maintainability"
1582
- echo ""
1583
- echo " Git & Release:"
1584
- echo " /feature - Create feature branch"
1585
- echo " /bugfix - Create bugfix branch"
1586
- echo " /hotfix - Create hotfix branch"
1587
- echo " /create-pr - Create PR from current branch"
1588
- echo " /release - Full release workflow"
1589
- echo " /version-bump - Bump project version"
1590
- echo " /changelog - Update CHANGELOG.md"
1591
- echo ""
1592
- echo " SEO:"
1593
- echo " /keyword-research - Seed keyword expansion"
1594
- echo " /autocomplete-research - Google autocomplete long-tails"
1595
- echo " /keyword-research-extended - Full SERP analysis with weakness detection"
1596
- echo " /webmaster-keywords - Keywords from GSC + Bing for your sites"
1597
- echo ""
1598
- echo " Utilities:"
1599
- echo " /onboarding - Interactive setup wizard (START HERE for new users)"
1600
- echo " /setup-aidevops - Deploy latest agent changes locally"
1601
- echo " /agent-review - Review and improve agent instructions"
1602
- echo " /session-review - Review session for completeness before ending"
1603
- echo " /context - Build AI context"
1604
- echo " /list-keys - List API keys with storage locations"
1605
- echo " /log-time-spent - Log time spent on a task"
1606
- echo ""
1607
- echo " Memory:"
1608
- echo " /remember - Store a memory for cross-session recall"
1609
- echo " /recall - Search memories from previous sessions"
1610
- echo ""
1611
- echo " Automation (Ralph Loops):"
1612
- echo " /ralph-loop - Start iterative AI development loop"
1613
- echo " /ralph-task - Run Ralph loop for a TODO.md task by ID"
1614
- echo " /full-loop - End-to-end: task → preflight → PR → postflight"
1615
- echo " /cancel-ralph - Cancel active Ralph loop"
1616
- echo " /ralph-status - Show Ralph loop status"
1617
- echo " /preflight-loop - Iterative preflight until all pass"
1618
- echo " /pr-loop - Monitor PR until approved/merged"
1619
- echo " /postflight-loop - Monitor release health"
1620
- echo ""
1621
- echo "New users: Start with /onboarding to configure your services"
1622
- echo ""
1623
- echo "Planning workflow: /list-todo -> pick task -> /feature -> implement -> /create-pr"
1624
- echo "New work: discuss -> /save-todo -> later: /list-todo -> pick -> implement"
1625
- echo "Quality workflow: /preflight-loop -> /create-pr -> /pr-loop -> /postflight-loop"
1626
- echo "Ralph workflow: tag task #ralph -> /ralph-task t042 -> autonomous completion"
1627
- echo "SEO workflow: /keyword-research -> /autocomplete-research -> /keyword-research-extended"
1628
- echo ""
1629
- echo "Restart OpenCode to load new commands."