퀘스트 보상은 이 캡과 별개로 추가됩니다 (캡 적용 후 합산). 주간 한도는 현재 제거된 상태(weeklyCapRemaining: -1 고정).
★ Insight ─────────────────────────────────────
클라이언트(GameScene.getSkorBracketCap)와 서버(skor-submit/index.ts getBracketCap)에 동일한 로직이 이중 구현되어 있음 — 낙관적 UI를 위한 의도적 중복이지만, 브래킷 값을 바꿀 때 두 곳 모두 수정해야 함
캡이 점수에 연동되어 있어 "고득점 = 더 많은 SKOR 허용"이라는 자연스러운 인센티브 구조를 형성
─────────────────────────────────────────────────
User
제한은 없고 얻을 수 있는 조건을 좀 수정하고 싶은데 적당한 느낌을 알려줘
Assistant
현재 시스템을 더 자세히 파악하겠습니다.
Assistant
현재 수치를 바탕으로 밸런스 분석을 하겠습니다.
Assistant
현재 수치 기반으로 밸런스 문제를 먼저 정리할게요:
핵심 문제점
중상위 점수에서 rawSkor가 항상 캡을 초과 → 아이템을 많이 모아도 캡에서 잘림
3000점 이상은 점수가 올라도 캡이 고정(110) → 고득점 인센티브 없음
퀘스트가 너무 grindy: 금똥 300개 모아야 겨우 5 SKOR
Assistant
전체 재설계면 좀 더 구체적인 방향이 필요해요. 몇 가지 더 여쭤볼게요.
Assistant
좋아요. 이제 전체 재설계안을 설계합니다.
Assistant
★ Insight ─────────────────────────────────────
현재 캡 구조의 핵심 문제는 "캡이 너무 낮아서 수집 실력이 수익에 반영 안 됨" — 브래킷을 올리면 자연스럽게 skill gap이 SKOR로 드러남
퀘스트는 누적 카운터 방식이라 interval이 너무 크면 사실상 dead feature — interval을 판당 평균 수집량보다 약간 크게 설정하면 매 10~15판마다 발동되는 "작은 보너스" 느낌이 됨
클라이언트(getSkorBracketCap)와 서버(getBracketCap)가 이중으로 존재하는 이유가 낙관적 UI(서버 응답 전 미리 표시)이므로, 두 함수는 항상 완전히 동일해야 함 — 하나만 바꾸면 표시값과 실수령값이 달라지는 버그 발생
─────────────────────────────────────────────────
계획 요약:
현재
변경
브래킷 구간
4단계 (최대 110)
7단계 (최대 280)
퀘스트 간격
금 300 / 다이아 150 / 토파즈 80 / 무지개 50
금 50 / 다이아 25 / 토파즈 12 / 무지개 8
퀘스트 보상
5 / 8 / 10 / 15
10 / 15 / 20 / 35
수정 파일
—
skor-submit/index.ts, GameScene.ts
3000점 숙련 플레이 기준 약 160 SKOR, 피버타임 완벽 활용 시 200에 근접합니다.
Review all changed files for reuse, quality, and efficiency. Fix any issues found.
Phase 1: Identify Changes
Run git diff (or git diff HEAD if there are staged changes) to see what changed. If there are no git changes, review the most recently modified files that the user mentioned or that you edited earlier in this conversation.
Phase 2: Launch Three Review Agents in Parallel
Use the Agent tool to launch all three agents concurrently in a single message. Pass each agent the full diff so it has the complete context.
Agent 1: Code Reuse Review
For each change:
Search for existing utilities and helpers that could replace newly written code. Look for similar patterns elsewhere in the codebase — common locations are utility directories, shared modules, and files adjacent to the changed ones.
Flag any new function that duplicates existing functionality. Suggest the existing function to use instead.
Flag any inline logic that could use an existing utility — hand-rolled string manipulation, manual path handling, custom environment checks, ad-hoc type guards, and similar patterns are common candidates.
Agent 2: Code Quality Review
Review the same changes for hacky patterns:
Redundant state: state that duplicates existing state, cached values that could be derived, observers/effects that could be direct calls
Parameter sprawl: adding new parameters to a function instead of generalizing or restructuring existing ones
Copy-paste with slight variation: near-duplicate code blocks that should be unified with a shared abstraction
Leaky abstractions: exposing internal details that should be encapsulated, or breaking existing abstraction boundaries
Stringly-typed code: using raw strings where constants, enums (string unions), or branded types already exist in the codebase
Unnecessary JSX nesting: wrapper Boxes/elements that add no layout value — check if inner component props (flexShrink, alignItems, etc.) already provide the needed behavior
Unnecessary comments: comments explaining WHAT the code does (well-named identifiers already do that), narrating the change, or referencing the task/caller — delete; keep only non-obvious WHY (hidden constraints, subtle invariants, workarounds)
Agent 3: Efficiency Review
Review the same changes for efficiency:
Assistant
에이전트 결과를 종합합니다:
효율성: 문제 없음 ✅ (Math.floor 패턴이 interval 값에 무관하게 안전함)
재사용: 서버/클라이언트 중복은 낙관적 UI 아키텍처 제약으로 불가피, 단 주석이 더 명확해야 함
품질: 주석 순서 오류 (JSDoc이 메서드와 분리됨), QUESTS 정렬 공백
코드를 확인하고 품질 문제만 수정합니다.
Assistant
JSDoc이 submitSkorOnGameOver와 분리되어 있는 게 확인됩니다. getSkorBracketCap 위치를 JSDoc 앞으로 이동하고, 주석도 정확하게 수정합니다.
Assistant
이제 QUESTS 정렬 공백을 확인합니다.
Assistant
정렬 공백은 의도적으로 컬럼을 맞춘 것으로, 가독성에 도움이 됩니다. 수정하지 않습니다.
수정 내용은 한 가지입니다:
JSDoc 순서 수정: submitSkorOnGameOver의 JSDoc이 getSkorBracketCap 메서드와 분리되어 있던 버그 수정 — JSDoc을 올바른 메서드 바로 위로 이동
주석 개선: getSkorBracketCap 주석에 "낙관적 UI 계산용"이라는 이유를 명시 — 왜 서버 로직을 클라이언트에 복제하는지 명확하게
나머지 지적사항들은 false positive로 처리합니다:
QUESTS 정렬 공백: 의도적, 가독성 향상
서버/클라이언트 로직 중복: Supabase Edge Function은 클라이언트 코드를 import할 수 없으므로 아키텍처 제약상 불가피
User
깃 푸시해줘
Assistant
푸시 완료됐습니다. dev 브랜치에 반영됐고, Edge Function 재배포도 잊지 마세요:
Missed concurrency: independent operations run sequentially when they could run in parallel
Hot-path bloat: new blocking work added to startup or per-request/per-render hot paths
Recurring no-op updates: state/store updates inside polling loops, intervals, or event handlers that fire unconditionally — add a change-detection guard so downstream consumers aren't notified when nothing changed. Also: if a wrapper function takes an updater/reducer callback, verify it honors same-reference returns (or whatever the "no change" signal is) — otherwise callers' early-return no-ops are silently defeated
Unnecessary existence checks: pre-checking file/resource existence before operating (TOCTOU anti-pattern) — operate directly and handle the error
Memory: unbounded data structures, missing cleanup, event listener leaks
Overly broad operations: reading entire files when only a portion is needed, loading all items when filtering for one
Phase 3: Fix Issues
Wait for all three agents to complete. Aggregate their findings and fix each issue directly. If a finding is a false positive or not worth addressing, note it and move on — do not argue with the finding, just skip it.
When done, briefly summarize what was fixed (or confirm the code was already clean).