Skip to content

Commit fed6950

Browse files
committed
feat: add AI autonomous development workflow with OpenCode
- ai-scheduler: daily trigger at 0:00 (UTC+8) to label ready issues - ai-plan: generate implementation plan when issue gets ai-task label - ai-implement: code implementation on push to ai/** branches - ai-iterate: handle PR feedback and scheduled iterations - Add oh-my-opencode.json config with MiniMax-M2.5 model - Add prompt files with /ulw-loop command - Add MINIMAX_API_KEY secret for OpenCode API
1 parent 7af063b commit fed6950

7 files changed

Lines changed: 17 additions & 2 deletions

File tree

.github/workflows/ai-implement.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ jobs:
6666
6767
- name: Run OpenCode
6868
id: opencode
69+
env:
70+
MINIMAX_API_KEY: ${{ secrets.MINIMAX_API_KEY }}
6971
run: |
7072
npm install -g @opencode-ai/cli
7173
bunx oh-my-opencode install --no-tui --claude=no --gemini=no --copilot=no
@@ -110,6 +112,8 @@ jobs:
110112

111113
- name: Fix tests
112114
if: steps.tests.outcome == 'failure'
115+
env:
116+
MINIMAX_API_KEY: ${{ secrets.MINIMAX_API_KEY }}
113117
run: |
114118
npm install -g @opencode-ai/cli
115119
bunx oh-my-opencode install --no-tui --claude=no --gemini=no --copilot=no

.github/workflows/ai-iterate.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ jobs:
6666
- name: Run OpenCode for changes
6767
if: steps.comments.outputs.result != '[]'
6868
id: opencode
69+
env:
70+
MINIMAX_API_KEY: ${{ secrets.MINIMAX_API_KEY }}
6971
run: |
7072
npm install -g @opencode-ai/cli
7173
bunx oh-my-opencode install --no-tui --claude=no --gemini=no --copilot=no

.github/workflows/ai-plan.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ jobs:
8585
id: opencode
8686
env:
8787
ISSUE_DATA: ${{ steps.issue.outputs.result }}
88+
MINIMAX_API_KEY: ${{ secrets.MINIMAX_API_KEY }}
8889
run: |
8990
npm install -g @opencode-ai/cli
9091

.github/workflows/prompts/ai-fix-tests-prompt.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/ulw-loop
2+
13
The tests failed for your implementation. Fix the failing tests.
24

35
Issue: #{{issue_number}}

.github/workflows/prompts/ai-implement-prompt.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
You are an AI coding assistant. Implement the approved plan for issue #{{issue_number}}: {{issue_title}}
1+
/ulw-loop
2+
3+
You are an AI coding assistant with oh-my-opencode. Implement the approved plan for issue #{{issue_number}}: {{issue_title}}
24

35
Implementation Plan:
46
{{plan}}

.github/workflows/prompts/ai-iterate-prompt.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/ulw-loop
2+
13
Apply the requested changes described in the PR comments.
24

35
Issue: #{{issue_number}}

.github/workflows/prompts/ai-plan-prompt.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
You are an AI coding assistant. Analyze the following GitHub issue and generate a detailed implementation plan.
1+
/ulw-loop
2+
3+
You are an AI coding assistant with oh-my-opencode. Analyze the following GitHub issue and generate a detailed implementation plan.
24

35
Issue #{{issue_number}}: {{issue_title}}
46

0 commit comments

Comments
 (0)