Skip to content

ci: 카탈로그 자동화 액션 7종 + 채점/발굴 시스템#1

Merged
glowElephant merged 2 commits into
mainfrom
feature/automation-actions
May 4, 2026
Merged

ci: 카탈로그 자동화 액션 7종 + 채점/발굴 시스템#1
glowElephant merged 2 commits into
mainfrom
feature/automation-actions

Conversation

@glowElephant
Copy link
Copy Markdown
Owner

Summary

  • 카탈로그 검증·점수 갱신·신규 후보 발굴을 GitHub Actions로 자동화
  • 6개 워크플로우 + scripts/automation.py 단일 CLI + _status/ 상태 디렉토리
  • docs/scoring.md 5요소 룰 그대로 따름. Pop+Act만 자동, 나머지 3개(Reviews/Quality/Trust)는 수동값 유지

워크플로우 6종

파일 트리거 역할
validate-catalog.yml PR/push frontmatter + schema 검증 (기존 validate-catalog.sh 호출)
link-check.yml PR + 주1회 cron source/upstream URL HEAD 체크
update-readme-index.yml catalog 변경 시 main push 카테고리별 catalog/<cat>/README.md 자동 갱신
monthly-borderline-rescore.yml 매달 1일 cron borderline 항목만 Pop+Act 재채점 → PR
quarterly-full-rescore.yml 분기 1일 cron 전체 재채점 + borderline 리스트 갱신 → PR
quarterly-rediscovery.yml 분기 1일 cron GitHub Search로 신규 후보 발굴 → 후보 표 임베드 PR

채점 정책 (디스커션 합의)

  • Tier: ≥20 = Tier1, 13~19 = Tier2, ≤12 = Tier3 (docs/scoring.md)
  • Borderline 범위: 1821 / 1114 (각 컷 ±2)
  • Freshness rule: AI 카테고리 + 6개월 내 커밋 없음 → 자동 Tier 3 강등
  • Tier 3 항목: frontmatter status: archived, README에서 취소선 처리
  • 다시 점수 회복하면 status: active 복귀
  • 신규 발굴 임계값: Pop+Act ≥ 7 (10점 만점), stars ≥ 500
  • 검색 범위: v1 시드 카테고리만 (claude-md/agents-md/skills/conventions/multi-agent/prompts/spec-driven/mcp/boilerplate). v2 도메인 확장은 안정화 후

새 파일/구조

  • scripts/automation.pyscore / rescore / discover / render-index subcommand
  • scripts/render_candidates_table.py — PR 본문용 후보 표 렌더 헬퍼
  • _status/borderline.json — 컷트라인 근접 항목 자동 추적
  • _status/candidates.json — 신규 발굴 후보 (분기 PR로 비움)
  • _status/history.jsonl — 모든 점수 변동 append-only 이력
  • catalog/_schema/entry.schema.jsonscore 객체 + status enum 필드 추가
  • catalog/<cat>/README.md × 8 — 자동 생성 인덱스

Test plan

  • bash scripts/validate-catalog.sh 로컬 통과 확인 (이미 ✅)
  • PR 머지 후 첫 cron 실행 (다음 1일) 결과 모니터링
  • 수동 workflow_dispatch 로 quarterly-rediscovery 1회 실행해서 임계값 적정성 확인
  • 발굴된 후보 0건이면 MIN_STARS / MIN_POP_ACT 조정 검토

Notes

  • gh CLI는 GitHub-hosted runner에 기본 설치, GITHUB_TOKEN 자동 인증
  • 외부 의존성 0개 (Python 3.11 표준 라이브러리만)
  • 모든 cron PR은 봇 브랜치(bot/...)로 push 후 자동 PR 생성 — 사람 검토 후 머지

- validate-catalog: PR/push 시 frontmatter + schema 검증
- link-check: source/upstream URL 살아있는지 (PR + 주1회)
- update-readme-index: catalog 변경 시 카테고리 README 자동 갱신
- monthly-borderline-rescore: 매달 borderline 항목 Pop+Act 재채점
- quarterly-full-rescore: 분기 전체 재채점 + borderline 리스트 갱신
- quarterly-rediscovery: 분기 GitHub Search로 신규 후보 자동 발굴

scripts/automation.py — 단일 CLI (score/rescore/discover/render-index)
- docs/scoring.md 5요소 룰 따름
- Pop+Act만 자동, Reviews/Quality/Trust는 수동값 유지
- AI 카테고리 6개월 freshness rule → 자동 Tier 3 강등
- 강등 시 frontmatter status: archived, README에 ~~취소선~~

_status/ 디렉토리 신설
- borderline.json: 컷트라인 ±2 자동 추적
- candidates.json: 신규 발굴 후보 누적 (분기 PR로 비움)
- history.jsonl: 모든 점수 변동 append-only 이력
…imit

- write_frontmatter 폐기 → update_frontmatter (in-place 키 치환)
  이전 구현은 URL 값에 따옴표를 추가해 2회차 rescore에서 source/upstream
  파싱이 깨지고 모든 엔트리가 skip되는 시한폭탄. 새 구현은 원본
  frontmatter 텍스트를 보존하고 score/status 키만 regex 치환.
  multi-line scalar, 키 순서, 따옴표 정책 모두 그대로 유지.
- borderline-only 모드: 기존엔 borderline.json 갱신을 건너뛰어 Tier
  올라간 항목이 계속 borderline에 남아 매달 재채점되는 무한 반복.
  rescore된 항목 결과로 borderline 리스트 patch.
- discover: GitHub Search API rate limit (10 req/min) 준수.
  gh_search 호출 사이 7초 sleep.

검증: catalog 23개 entry 전수 round-trip + 2회차 idempotency 통과.
@glowElephant
Copy link
Copy Markdown
Owner Author

셀프 리뷰 + 수정 (16d7e15)

code-reviewer 에이전트로 독립 리뷰 돌리고 블로커 2개 + 중요 1개 수정했어.

발견 → 수정

Critical 1 — URL 값 round-trip 파괴 (실측 확인됨)

  • 기존 write_frontmatter: 포함 값에 따옴표 자동 추가 → source: "https://..."
  • 다음 rescore에서 _coerce가 따옴표 벗기지만 partition(":")https를 key로 잘라버림
  • 2회차부터 모든 source/upstream 깨져서 전 엔트리 skip되는 시한폭탄
  • write_frontmatter 폐기, update_frontmatter 신설: 원본 frontmatter 텍스트 보존하고 score/status 키만 regex 치환. multi-line scalar 손실 위험도 동시 해결.

Critical 2 — borderline-only 무한 반복

  • 기존엔 borderline-only 모드에서 borderline.json 갱신 자체를 건너뜀
  • Tier 올라간 항목이 계속 리스트에 남아 매달 같은 거 재채점
  • → rescore된 항목으로 borderline 리스트 patch (band 벗어난 건 제거, 남은 건 점수 갱신)

Important — discover rate limit

  • 27회 search 호출, GitHub Search API는 10 req/min → 429 발생 시 조용히 누락
  • → gh_search 사이 time.sleep(7) 추가

검증

  • catalog 23개 entry 전수 round-trip + 2회차 idempotency 통과
  • bash scripts/validate-catalog.sh 통과
  • 실측 diff: URL/multi-line scalar/키 순서 모두 보존, score/status 블록만 깔끔하게 추가

보류

  • AI_CATEGORIES 축소 (리뷰어 #5): docs/scoring.md 시드 정책 재확인 결과, v1 전체가 의도적으로 AI 생태계만 선별된 것 → 모든 카테고리에 freshness 적용이 의도와 일치. 수정 안 함. v2 도메인 확장 시 새 카테고리만 면제 처리하면 됨.

@glowElephant glowElephant merged commit a5ccc70 into main May 4, 2026
3 checks passed
@glowElephant glowElephant deleted the feature/automation-actions branch May 4, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant