AI Monthly Review #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: AI Monthly Review | |
| "on": | |
| issues: | |
| types: [opened] | |
| workflow_dispatch: | |
| inputs: | |
| issue_number: | |
| description: "Issue number to review" | |
| required: true | |
| jobs: | |
| ai-review: | |
| if: contains(github.event.issue.labels.*.name, 'monthly-review') || inputs.issue_number != '' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| issues: write | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Load review issue context | |
| id: issue_context | |
| run: | | |
| mkdir -p data/output/ai_review | |
| python3 - <<'PY' | |
| import json | |
| import os | |
| import urllib.request | |
| from pathlib import Path | |
| repo = os.environ["GITHUB_REPOSITORY"] | |
| issue_number = os.environ["ISSUE_NUMBER"] | |
| token = os.environ["GITHUB_TOKEN"] | |
| api_url = f"https://api.github.com/repos/{repo}/issues/{issue_number}" | |
| request = urllib.request.Request( | |
| api_url, | |
| headers={ | |
| "Accept": "application/vnd.github+json", | |
| "Authorization": f"Bearer {token}", | |
| "X-GitHub-Api-Version": "2022-11-28", | |
| "User-Agent": "crypto-leader-rotation-ai-review", | |
| }, | |
| ) | |
| with urllib.request.urlopen(request) as response: | |
| issue = json.load(response) | |
| issue_context = { | |
| "number": issue["number"], | |
| "title": issue["title"], | |
| "body": issue["body"], | |
| } | |
| Path("data/output/ai_review/issue_context.json").write_text( | |
| json.dumps(issue_context, ensure_ascii=False, indent=2) + "\n", | |
| encoding="utf-8", | |
| ) | |
| with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as output: | |
| print("issue_title<<EOF", file=output) | |
| print(issue["title"], file=output) | |
| print("EOF", file=output) | |
| print("issue_body<<EOF", file=output) | |
| print(issue["body"], file=output) | |
| print("EOF", file=output) | |
| PY | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| ISSUE_NUMBER: ${{ inputs.issue_number || github.event.issue.number }} | |
| - name: Run Claude Code Review | |
| id: claude_review | |
| uses: anthropics/claude-code-action@v1 | |
| with: | |
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| use_bedrock: false | |
| use_vertex: false | |
| prompt: | | |
| Do not use Bash or ask for additional approval. | |
| Return only the final bilingual review in markdown. | |
| The workflow will publish your final review as the issue comment. | |
| You are reviewing the monthly upstream selector report for CryptoLeaderRotation. | |
| This repository owns monthly universe selection, ranking, challenger evaluation, | |
| and publication of a 5-symbol Binance Spot leader pool for downstream execution. | |
| This is a strategy-optimization review, not only a release QA check. | |
| Your job is to help the operator judge: | |
| - whether the published official pool looks internally consistent and research-valid, | |
| - whether the current evidence is sufficient to keep or change the selector, | |
| - what the next highest-value shadow/challenger experiments should be. | |
| Important interpretation rules: | |
| - Do not recommend changing production selector logic from one monthly snapshot alone. | |
| - If shadow or challenger tracks are missing, say evidence is incomplete rather than making strong claims. | |
| - Treat release consistency and validation as a prerequisite, but spend most attention on selector quality and research direction. | |
| - BinancePlatform is a downstream execution engine that consumes this 5-symbol pool and then selects its own final live targets from it. | |
| ## Issue Title | |
| ${{ steps.issue_context.outputs.issue_title }} | |
| ## Issue Body | |
| ${{ steps.issue_context.outputs.issue_body }} | |
| ## Review Scope | |
| 1. **Release Consistency & Contract Health** | |
| - Do release metadata, symbols, pool_size, version, and validation state agree? | |
| - Are there any warnings, stale artifacts, or publish flags that weaken trust in this release? | |
| 2. **Selector Quality Review** | |
| - Does the official 5-symbol pool look reasonable for a Binance Spot mainstream leader universe? | |
| - Does the ranking preview show healthy score separation, or suspicious clustering/tie behavior? | |
| - Are any symbols potentially borderline on liquidity, stability, or crowding risk for downstream live use? | |
| 3. **Research Coverage & Evidence Gaps** | |
| - Is shadow/challenger coverage present? | |
| - If not present, explicitly say that strategy-optimization evidence is incomplete. | |
| - If present, explain whether official baseline still looks justified versus challengers. | |
| 4. **Downstream Impact (BinancePlatform)** | |
| - What are the likely downstream implications for BinancePlatform, which consumes this pool monthly? | |
| - Highlight any pool changes or symbol characteristics that could affect downstream rotation behavior or turnover. | |
| 5. **Strategy Optimization Directions** | |
| - Suggest the 1-3 highest-value next research directions in this repository. | |
| - Prefer ideas such as challenger track design, shadow build coverage, ranking weight review, regime-weight review, universe-filter tuning, and validation additions. | |
| - Do not suggest arbitrary complexity; prioritize explainable, low-risk, testable improvements. | |
| 6. **Operator Action Items** | |
| - Summarize immediate operator checks for this month. | |
| - Separate "safe to keep production as-is" from "needs more research evidence". | |
| ## Output Format | |
| Structure your response as: | |
| --- | |
| ## English | |
| ### Release Consistency | |
| ... | |
| ### Selector Quality | |
| ... | |
| ### Research Coverage Gaps | |
| ... | |
| ### Downstream Impact (BinancePlatform) | |
| ... | |
| ### Strategy Optimization Directions | |
| ... | |
| ### Operator Action Items | |
| ... | |
| --- | |
| ## 中文 | |
| ### 发布一致性检查 | |
| ... | |
| ### 选币器质量评估 | |
| ... | |
| ### 研究覆盖缺口 | |
| ... | |
| ### 下游影响(BinancePlatform) | |
| ... | |
| ### 策略优化方向 | |
| ... | |
| ### 操作员待办事项 | |
| ... | |
| - name: Render Claude primary review | |
| if: steps.claude_review.outcome == 'success' | |
| run: | | |
| python3 scripts/render_monthly_ai_review.py \ | |
| --execution-file "${{ steps.claude_review.outputs.execution_file }}" \ | |
| --output-file data/output/ai_review/primary_review.md \ | |
| --primary-title "Claude Primary Review" | |
| - name: Run GPT secondary review | |
| if: steps.claude_review.outcome == 'success' | |
| run: | | |
| python3 scripts/run_openai_secondary_review.py \ | |
| --review-kind upstream_selector \ | |
| --issue-context-file data/output/ai_review/issue_context.json \ | |
| --primary-review-file data/output/ai_review/primary_review.md \ | |
| --output-file data/output/ai_review/secondary_review.json \ | |
| --model "${OPENAI_SECONDARY_MODEL}" | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| OPENAI_SECONDARY_MODEL: ${{ vars.OPENAI_SECONDARY_MODEL || 'gpt-5.4-mini' }} | |
| - name: Render final AI review markdown | |
| if: steps.claude_review.outcome == 'success' | |
| run: | | |
| python3 scripts/render_monthly_ai_review.py \ | |
| --primary-review-file data/output/ai_review/primary_review.md \ | |
| --secondary-review-file data/output/ai_review/secondary_review.json \ | |
| --output-file data/output/ai_review/final_review.md \ | |
| --primary-title "Claude Primary Review" | |
| - name: Upload AI review artifact | |
| if: steps.claude_review.outcome == 'success' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ai-monthly-review-${{ inputs.issue_number || github.event.issue.number }} | |
| path: data/output/ai_review/ | |
| - name: Post AI review issue comment | |
| if: steps.claude_review.outcome == 'success' | |
| run: | | |
| python3 scripts/post_monthly_ai_review_comment.py \ | |
| --repo "${GITHUB_REPOSITORY}" \ | |
| --issue-number "${{ inputs.issue_number || github.event.issue.number }}" \ | |
| --review-file data/output/ai_review/final_review.md \ | |
| --run-url "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |