SCAManager
CLAUDE.md1 starsChanged 18 days agoApache-2.0View on GitHub
GitHub Push/PR → 정적 분석 + AI 리뷰 → 점수·등급 → 알림(Telegram·GitHub·Discord·Slack·Email·n8n) → 점수 기반 PR Gate·웹 대시보드. 구조 = architecture.md, 수치 = docs/STATE.md. 1. 브랜치 — 워크트리에서: git fetch origin && git worktree add ../<폴더> -b <type>/<scope> origin/main. 주 체크아웃은 main 에 두고 머지 뒤 git pull --ff-only — 리포 훅 · 설정은 주 체크아웃의 파일로 돈다(어긋나면 세션 시작 때 알린다). 접두사: feat/ fix/ chore/ docs/. main 에 직접 커밋·push 하지 않는다. 2. 영역 문서를 연다 — 아래 표에서…
- Reads credentials
- Installs packages
- Commits and pushes
In this repository2 other files it gives its agents.
- integrity-auditSkill
- retrospectiveSkill
The file
Files
SCAManager
GitHub Push/PR → 정적 분석 + AI 리뷰 → 점수·등급 → 알림(Telegram·GitHub·Discord·Slack·Email·n8n) → 점수 기반 PR Gate·웹 대시보드. 구조 = architecture.md, 수치 = docs/STATE.md.
작업 절차
- 브랜치 — 워크트리에서:
git fetch origin && git worktree add ../<폴더> -b <type>/<scope> origin/main. 주 체크아웃은 main 에 두고 머지 뒤git pull --ff-only— 리포 훅 · 설정은 주 체크아웃의 파일로 돈다(어긋나면 세션 시작 때 알린다). 접두사:feat/fix/chore/docs/.main에 직접 커밋·push 하지 않는다. - 영역 문서를 연다 — 아래 표에서 건드릴 영역 하나. 세부 절차가 거기 있다.
- 테스트 먼저 — 행동 변경은 구현 전에 실패하는 테스트를 쓴다(측정-only 는 기록 테스트 초록 허용).
in·==·집합 소속으로 부류를 판정하는 식을 쓰면 바로 부분문자열≠상태 · 계기 뒤집기(두 심음) · 못 재면 red. 정본은 verify.md 「판정식을 쓸 때」 3~5. - 구현
- 검증 — verify.md 의 절차를 그대로 따른다.
- PR —
gh pr create --body-file <임시파일>(URL 안내 금지). - 머지 — 승인 발화 · head 40자리를 PR 댓글로 남기고
py -3 scripts/merge_approved.py <PR> --head <SHA> --approval "<발화>". 승인(위임 포함)은 그 head 에 묶인다 — 뒤에 push 했으면 다시 받는다. 시각 변경(templates/·static/·i18n/)은 화면을 본 발화(--visual)까지 받는다 — 위임으로 덮지 않고, 정적 테스트 통과는 근거가 아니다. 머지 뒤 배포를 확인한다(deploy.md).
영역 문서
| 건드리는 곳 | 문서 |
src/worker/pipeline.py · src/analyzer/** · src/scorer/** | pipeline.md |
src/gate/** · src/notifier/** · src/webhook/** | gate-notify.md |
src/models/** · src/repositories/** · alembic/** | db.md |
Dockerfile · Railway 대시보드 설정 · src/config.py · .env.example · requirements*.txt | deploy.md |
tests/** · e2e/** · scripts/** · .github/workflows/** · .claude/** | verify.md |
src/templates/** · src/static/** · src/ui/** · src/i18n/** | ui-i18n.md |
src/auth/** · src/crypto.py · .pre-commit-config.yaml | security.md |
src/shared/** | security.md + deploy.md |
src/api/** · src/config_manager/** · src/services/** | gate-notify.md + db.md |
src/main.py · src/config.py · src/constants.py · src/database.py · src/scheduler.py · src/logging_config.py · src/middleware/** | deploy.md |
src/github_client/** · src/railway_client/** · src/verifier/** · src/mcp/** · src/cli/** | gate-notify.md |
명령
py -3 -m pytest tests/unit -q # 단위 전체 (push 전 필수)
py -3 scripts/pre_push_gate.py # CI 가드를 로컬에서 (--full: pylint·bandit 추가)
py -3 -m pytest e2e/ -p no:asyncio # E2E (tests/ 와 같이 돌리지 않는다)make 이 없는 환경(Windows 등)에서는 Makefile 의 그 타깃 명령을 그대로 친다 — make X 실패는 환경 문제다.
최초 설정: cp .env.example .env → .env 의 SESSION_SECRET 에 openssl rand -hex 32 값(없거나 32자 미만이면 import 에서 멈춘다)
→ py -3 -m pip install -r requirements-dev.txt · semgrep 은 자기 venv(requirements-semgrep.txt — 그 semgrep 만 PATH 에, Makefile install)
→ npm install && npm run build → py -3 -m pre_commit install → py -3 -m uvicorn src.main:app --reload
협업 규칙
- 사용자에게 쓰는 말은 한국어다(코드 · 명령 · 고유명사는 원문 그대로).
- 옵션 제시는 장단점 표 + 권장안 1개.
- PR 본문에 사람이 눈으로 확인할 항목 1~3개 — "테스트 통과" 만 적지 않는다.
- 위임 작업 중 스스로 판단한 것은 PR 본문이나 응답 끝에 명시한다.
- 스키마·API·권한·데이터모델 변경은 착수 전 확인받고, 나머지는 진행하고 보고한다.
- 사용자 결정은
[WBS]원장의 결정 줄(날짜 · 결정 이름)과, 그 결정을 이행하는 PR 본문의 원문 인용 한 줄로 남긴다 — 민감한 결정은 두 곳 모두 «내용은 작성자 메모» 로만 적는다. 문서 · 런북에 «결정» 으로 적는 것은 그 뒤다. - 운영은 행위로 가른다: 배포·로그·상태 읽기와 DB 읽기(
scripts/observe_db.py— 관측 역할)만 자율,railway ssh·run·배포·변수 변경(훅이 막는다)과 그 밖의 DB SQL · 운영 DB 직접 접속은 사용자가!로.SET SESSION …은 풀러가 앱 연결에 남긴다. - 문서 수치는 실행 결과를 옮긴다. 코드 좌표는 줄번호가 아니라 앵커다 —
path::파일에 실재하는 문자열(scripts/check_doc_anchors.py가 강제).
파일 수정 제한
alembic/versions/ · src/templates/*.html · Dockerfile · .dockerignore · alembic.ini 은 테스트 불가
환경에서 훅이 차단한다(로컬 PC·Codespaces 는 허용).
🔴 차단은 Write|Edit|MultiEdit 에만 걸린다 — Bash 로 고치면 막히지 않는다(PostToolUse 는 알리기만).
코드 주석
한국어를 먼저 쓰고 다음 줄에 영어를 붙인다. # TODO·# type: ignore 같은 표준 태그는 영어 단독.
관행이지 게이트는 아니다(비율 = scripts/i18n_comments/check_bilingual.py src/ --report).
문서 규칙
🔴 문서 총량은 늘리지 않는다.
- 현재 코드 기준만 적는다. 과거 이력·사고 서사·날짜·PR 번호는 git 이 갖고 있다.
- 규칙 나열이 아니라 수행 절차로 적는다 — 금지는 절차 안의 한 줄로 녹인다. 왜 생겼는지는 쓰지 않는다.
- 자수가 늘면 본문 줄 맨 앞
doc-growth: <뺀 것 · 늘린 이유>— CI 가 잰다(보고서 ·.claude/제외). - 새 문서 전에 기존 문서에 자리가 없는지 본다.
- 문서 개수·문장 존재를 강제하는 테스트를 만들지 않는다(
len(docs) >= N, 「이 문장이 살아 있을 것」). 공허화 방어는 「집합이 비었는가」로 충분하다. - 테스트 수는 문서에 적지 않는다 — PR 본문 첫 줄이 유일한 자리다(CI 가 junit 과 대조). E2E 기준은
e2e/EXPECTED_COUNT. src/에 파일을 추가·삭제하면docs/architecture.md트리를 갱신한다.
진행 중인 일
GitHub Issues — 여러 세션 작업은 [WBS] Issue 가 진입점이다(gh issue list --search "WBS in:title").
메모리 진입점 절은 그 Issue 를 가리키고 수치·SHA 는 적지 않는다 — scripts/check_memory_refs.py 는 그 절의 SHA · 복사한 테스트 수 · 줄번호 좌표만 잡는다(다른 수치는 사람이 지킨다).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

