Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/automated-code-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Automated Code Review

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: read
issues: write
pull-requests: write

jobs:
review:
if: ${{ !github.event.pull_request.draft }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Bun
uses: oven-sh/setup-bun@v2

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Run automated review
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_REVIEW_MODEL: ${{ vars.OPENAI_REVIEW_MODEL || 'gpt-5.5' }}
REVIEW_REPORT_TITLE: "자동 PR 코드 리뷰"
REVIEW_CADENCE: "PR 리뷰"
REVIEW_BASE: ${{ github.event.pull_request.base.sha }}
REVIEW_HEAD: ${{ github.event.pull_request.head.sha }}
REVIEW_GITHUB_COMMENT: "1"
REVIEW_EXPORT_NOTION: ${{ vars.REVIEW_EXPORT_NOTION || '0' }}
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
NOTION_DATABASE_ID: ${{ secrets.NOTION_DATABASE_ID }}
NOTION_TITLE_PROPERTY: ${{ vars.NOTION_TITLE_PROPERTY || 'Name' }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: bun run review -- --fail-on P1

- name: Upload review report
if: always()
uses: actions/upload-artifact@v4
with:
name: automated-code-review
path: tools/code-review/output/
46 changes: 46 additions & 0 deletions .github/workflows/scheduled-study-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Scheduled Study Review Report

on:
schedule:
- cron: "0 23 * * *"
- cron: "30 23 * * 4"
workflow_dispatch:

permissions:
contents: read

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Bun
uses: oven-sh/setup-bun@v2

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Publish scheduled review report
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_REVIEW_MODEL: ${{ vars.OPENAI_REVIEW_MODEL || 'gpt-5.5' }}
REVIEW_REPORT_TITLE: "정기 스터디 코드 리뷰"
REVIEW_CADENCE: ${{ github.event.schedule == '30 23 * * 4' && '금요일 주간 보고서' || '매일 아침 보고서' }}
REVIEW_BASE: "HEAD~1"
REVIEW_HEAD: "HEAD"
REVIEW_EXPORT_NOTION: "1"
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
NOTION_DATABASE_ID: ${{ secrets.NOTION_DATABASE_ID }}
NOTION_TITLE_PROPERTY: ${{ vars.NOTION_TITLE_PROPERTY || 'Name' }}
run: bun run review

- name: Upload scheduled report
if: always()
uses: actions/upload-artifact@v4
with:
name: scheduled-study-review-report
path: tools/code-review/output/
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

# testing
/coverage
/review-output
/tools/code-review/output

# next.js
/.next/
Expand Down
10 changes: 9 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ bugs, regressions, security issues, auth problems, CORS problems, token exposure
missing validation, missing tests, broken API contracts, performance risks,
and maintainability problems.

## Primary Review Criteria

Use these criteria as the first pass for every review:

1. Meaningful variable and function naming
2. Readability improvements through early returns when they reduce nesting
3. Runtime performance and complexity risks

## Severity

- P0: outage, data loss, critical security issue
Expand All @@ -23,4 +31,4 @@ and maintainability problems.
- Separate existing failures from newly introduced failures.
- Prefer concrete, fixable findings.
- Include impact, suggested fix, and verification step.
- Do not report generic style preferences.
- Do not report generic style preferences.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build": "bun next build",
"start": "bun ext start",
"lint": "bun biome check --apply .",
"review": "bun tools/code-review/review-harness.ts",
"test": "bun test ./src/**/*.test.ts",
"format": "biome format --write",
"prepare": "husky"
Expand Down
Empty file.
Empty file removed review-agents/bug-reviewer.md
Empty file.
Empty file.
Empty file removed review-agents/reporter.md
Empty file.
Loading
Loading