Skip to content

[docs] 방(Room) 도메인 PRD 역설계 (specs/005-room-domain)#358

Open
buzz0331 wants to merge 2 commits into
chore/spec-kit-setupfrom
005-room-domain
Open

[docs] 방(Room) 도메인 PRD 역설계 (specs/005-room-domain)#358
buzz0331 wants to merge 2 commits into
chore/spec-kit-setupfrom
005-room-domain

Conversation

@buzz0331
Copy link
Copy Markdown
Contributor

@buzz0331 buzz0331 commented May 17, 2026

Summary

운영 중인 방(Room) 도메인을 사용자 관점에서 역설계해 PRD로 정형화한 다섯 번째 산출물.
신규 기능 정의가 아닌 기존 구현을 "이래야 한다"로 문서화하는 작업.

Depends on #353 (Spec Kit 셋업 + 헌법 v1.0.0 비준). #353 머지 후 base를 develop으로 retarget 예정.

무엇이 추가되는가

파일 내용
specs/005-room-domain/spec.md 방 도메인 PRD (한국어, 267 줄)
specs/005-room-domain/checklists/requirements.md 사양 품질 체크리스트 (15/15 통과)

PRD 구성

  • User Stories 6건 (우선순위)
    • P1: 방 만들고 모집 시작 (호스트 자동 참여, 공개·비공개 짝 검증, 날짜·카테고리 유효성)
    • P1: 모집 중 방 둘러보고 참여 (키워드/카테고리/정렬, 비공개 비밀번호 검증, 모집 만료·정원 초과 거부)
    • P1: 내 참여 방 관리 (홈 활성·전용 목록 상태 필터·호스트 외 나가기)
    • P2: 호스트 운영 (모집 마감 → 진행 중 전환)
    • P2: 방 안 활동 컨텍스트 (책 페이지 + 총평 가능 여부)
    • P2: 카테고리별 추천 (마감 임박/인기/최근 생성)
  • Functional Requirements 27건 — 생성·발견·참여·운영·라이프사이클·내 방 관리·컨텍스트·좋아요 연계
  • Success Criteria 7건 — 정원 초과 0건, 호스트 없는 방 0건, 상태 일치율 100% 등
  • Edge Cases 9건 — 공개/비공개 짝, 날짜 유효성, 카테고리 정합성, 정원·참여자 무결성, 호스트 이탈, 자동 만료

핵심 결정

라이프사이클 (FR-021, FR-022)

`RECRUITING` → (호스트 모집 마감) → `IN_PROGRESS` → (종료일 도달, 시간 트리거 자동) → `EXPIRED`

자동 만료는 시간 기반(스케줄) 트리거로 사용자 액션 없이 수행. 종료일 경계 이후 첫 가시점부터 만료 노출.

"인기 방" 산정 기준 (FR-009)

신호 모집 중 방의 memberCount 내림차순
기준 단위 절대 참여자 수 (충원율 아님)
대상 모집 중 상태 한정
개인화 없음 (모든 사용자 동일)
동률 처리 결정적 순서 미강제

책 PRD(#356)의 인기 기준은 전날 상세 조회 호출 수, 방 PRD는 현재 참여자 수. 도메인별로 인기 신호가 다르다는 점에 주의.

호스트 이탈 정책 (FR-017, Edge Cases)

현재 정책: 호스트는 어떤 경로로도 방을 떠날 수 없음. 양도·방 폐쇄(삭제) 기능 모두 미제공. 호스트는 방이 `EXPIRED`에 도달할 때까지 호스트로 남음.

향후 도입 예정 (Assumptions에 명시):

  • 호스트 권한 양도 기능
  • 호스트만 남았을 때 한정 방 삭제 기능
  • 두 기능 도입 시 본 PRD를 개정 트리거로 본다 (FR-016, FR-017, Edge Cases 업데이트 필요)

공개/비공개의 짝 검증 (FR-003)

"공개 방 + 비밀번호" 또는 "비공개 방 + 비밀번호 없음" 조합은 거부. 정확히 짝을 이뤄야 함.

정원·참여자 무결성 (FR-018)

`memberCount`는 1 미만으로 감소할 수 없음(호스트는 항상 존재). 어떤 동시성 시나리오에서도 활성 참여 관계 수와 일치.

범위 외 (의도적)

누적 PRD 진행 상황

# 도메인 PR
001 피드(Feed) #354
002 팔로우(Follow) #355
003 책(Book) #356
004 방 게시글(RoomPost) — 기록·투표 #357
005 방(Room) 본 PR

Test plan

  • PRD 본문이 비즈니스 어휘로 읽히는지 (BCrypt 등 구현 디테일 누출 점검)
  • "인기 방" = memberCount 내림차순(절대값) 정책이 현재 구현·운영 의도와 일치하는지
  • 호스트 이탈 전면 불가 정책이 현재 운영 의도와 일치하는지
  • 향후 호스트 양도·호스트 단독 방 삭제 도입 시점·우선순위에 대한 팀 의견
  • 자동 만료 트리거 메커니즘(시간 기반 잡)이 실제로 동작하는지 운영 지표 확인 필요 여부
  • 카테고리 5종 사전이 본 PRD의 범위로 충분한지, 향후 추가 계획이 있다면 우선순위
  • 누락된 시나리오(예: 호스트 권한 표시 UI, 비공개 방의 검색 노출 정책, 방 신고 등) 검토

Summary by CodeRabbit

Documentation

  • Room 기능에 대한 완전한 제품 요구사항 명세 문서 추가
  • Room 기능 스펙 품질 검증 체크리스트 문서 신규 작성

Review Change Stack

- 운영 중인 방 도메인을 사용자 관점으로 정형화 (신규 기능 정의 아님)
- User Story 6건 (P1: 방 생성·발견과 참여·내 방 관리,
  P2: 호스트 운영·방 안 컨텍스트·카테고리별 추천)
- Functional Requirements 27건 (FR-001 ~ FR-027)
- 측정 가능한 Success Criteria 7건, Edge Cases 9건, Assumptions 10건
- 방 라이프사이클 명문화: RECRUITING -> IN_PROGRESS -> EXPIRED
  IN_PROGRESS 전환은 호스트의 모집 마감, EXPIRED 전환은 종료일 기반
  시간 트리거(스케줄)로 자동 수행
- 공개/비공개의 비밀번호 짝 검증, 카테고리 5종 사전 명시
- "인기 방" 산정 기준 명문화: 모집 중 방의 memberCount 내림차순
  (충원율 아닌 절대 참여자 수, 개인화 없음)
- 호스트 이탈 정책 명문화: 현재 정책상 호스트는 어떤 경로로도
  방을 떠날 수 없음 (양도·방 폐쇄 기능 미제공)
- 향후 도입 예정: 호스트 양도 + 호스트 단독 방 삭제
  (도입 시 본 PRD 개정 트리거로 Assumptions에 명시)
- 책 도메인은 외부 의존(#356), 방 안 활동은 RoomPost PRD(#357),
  알림·신고는 별도 도메인
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 17, 2026

Warning

Rate limit exceeded

@buzz0331 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 44 minutes and 32 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: fffa03cb-6000-49bf-960d-04095789575f

📥 Commits

Reviewing files that changed from the base of the PR and between 97fd806 and 657adc9.

📒 Files selected for processing (1)
  • specs/005-room-domain/spec.md

개요

방(Room) 도메인의 사용자 관점 역설계 PRD와 스펙 품질 검증 체크리스트가 신규로 추가되었습니다. 방의 라이프사이클, 호스트·멤버 역할, 모집·검색·참여·운영 플로우, 27개의 기능 요구사항, 데이터 모델, 7가지 성공 기준, 의존성 가정이 포함됩니다.

변경 사항

Room 도메인 완전한 스펙 정의 및 검증

Layer / File(s) 요약
스펙 기초 및 사용자 시나리오
specs/005-room-domain/spec.md
PRD 범위(기술 구현 의도 배제)를 정의하고, 방 만들기·검색·참여·호스트 운영·내 방 관리·추천 방 조회를 포괄하는 6개 사용자 스토리를 독립 테스트/수용 시나리오와 함께 작성합니다.
엣지 케이스 및 제약 조건
specs/005-room-domain/spec.md
공개/비밀번호 짝 검증, 시작일·종료일 유효성, 모집 만료 후 거부, 정원 초과 거부, 호스트 이탈 불가, 자동 만료 전환 등 9가지 엣지 케이스를 명시합니다.
기능 요구사항 및 데이터 모델
specs/005-room-domain/spec.md
FR-001~FR-027 기능 요구사항과 Room·Participant·Status·Role·Category·Book 관련 핵심 엔터티를 정의합니다.
성공 기준 및 의존성 가정
specs/005-room-domain/spec.md
SC-001~SC-007 사용자 경험 성공 기준, 인증·도메인 의존성(책/활동/좋아요), 향후 기능(호스트 양도/단독 삭제) 도입 예정과 개정 트리거를 명시합니다.
스펙 품질 검증 체크리스트
specs/005-room-domain/checklists/requirements.md
필수 섹션 완성, 마커 해소, 테스트 가능성, 측정 가능한 성공 기준, 범위 명확성, 의존성 명시, 기능 준비도 등 10개 항목으로 스펙 완성도를 검증하고 1차 검증 완료를 기록합니다.

평가

🎯 2 (Simple) | ⏱️ ~12분

🐰 새로운 방의 세계가 열렸네!
호스트와 멤버의 역할 분명히,
스펙은 완벽히 점검되고,
향후 기능까지 예약했으니
구현의 길은 이제 평탄하리!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 PR의 핵심 변경사항인 Room 도메인 PRD 역설계 및 신규 스펙 문서 추가를 명확히 요약하고 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 005-room-domain

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@specs/005-room-domain/checklists/requirements.md`:
- Line 10: The checklist line "Focused on user value and business needs —
우선순위(P1~P3)로 사용자 가치 정렬" is inconsistent with the spec (which defines only P1 and
P2); update that text to reflect the actual priority scheme (e.g., "우선순위(P1/P2)로
사용자 가치 정렬" or similar) so the checklist matches the user story priorities
defined in the spec.

In `@specs/005-room-domain/spec.md`:
- Around line 193-196: FR-027 currently asserts that users can toggle likes,
which conflicts with this PRD's scope; update the FR-027 entry so it only
guarantees consistent association of room identifiers with room posts and
explicitly delegates the toggle behavior to the external RoomPost PRD / 좋아요 공통
정책 PRD (i.e., remove the direct “사용자는 ... 토글할 수 있다” requirement and replace it
with a sentence like “이 PRD는 방 식별자의 게시물 연계만 보장하며, 좋아요 토글의 상세 동작은 RoomPost
PRD(`#357`) 및 좋아요 공통 정책 PRD를 따릅니다”), ensuring FR-027 references the external PRDs
rather than mandating toggle functionality.
- Around line 180-182: Update FR-021 and FR-022 to specify a single, unambiguous
expiration boundary: state that a room transitions to "만료" at exactly 00:00:00
UTC on the calendar day after the room's configured end date (i.e., end date is
inclusive through 23:59:59.999 UTC), and that the time-based scheduler uses UTC
for all evaluations (no local timezone offsets); reference FR-021 and FR-022 so
tests and implementations know the scheduler triggers expiration at 00:00:00 UTC
following the inclusive end date.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 288c433b-846b-4eb6-80a4-864a386828c0

📥 Commits

Reviewing files that changed from the base of the PR and between 2277cb3 and 97fd806.

📒 Files selected for processing (2)
  • specs/005-room-domain/checklists/requirements.md
  • specs/005-room-domain/spec.md

## Content Quality

- [x] No implementation details (languages, frameworks, APIs) — BCrypt/JPA/스케줄러 등 구현 용어 본문 미포함
- [x] Focused on user value and business needs — 우선순위(P1~P3)로 사용자 가치 정렬
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

우선순위 범위 표기를 실제 스펙과 맞춰 주세요.

현재 체크리스트는 P1~P3를 전제로 서술하지만, 본 스펙의 사용자 스토리는 P1/P2만 정의되어 있습니다. 문구를 실제 우선순위 체계와 일치시키는 게 좋겠습니다.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@specs/005-room-domain/checklists/requirements.md` at line 10, The checklist
line "Focused on user value and business needs — 우선순위(P1~P3)로 사용자 가치 정렬" is
inconsistent with the spec (which defines only P1 and P2); update that text to
reflect the actual priority scheme (e.g., "우선순위(P1/P2)로 사용자 가치 정렬" or similar)
so the checklist matches the user story priorities defined in the spec.

Comment on lines +180 to +182
- **FR-021**: 방은 정확히 다음 셋 중 하나의 상태를 가진다: *모집 중*, *진행 중*, *만료*. 상태 전이는 (a) 생성 시 *모집 중*, (b) 호스트의 모집 마감 시 *진행 중*, (c) 종료일 도달 시 *만료*로 이루어진다.
- **FR-022**: 사용자가 보는 방의 상태는 항상 그 시점의 실제 상태와 일치해야 한다. *진행 중* 방의 *만료* 전환은 종료일을 기준으로 시간 기반(스케줄) 트리거에 의해 자동으로 수행되며, 사용자 액션은 필요하지 않다.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

종료일 경계 시점 정의를 단일 규칙으로 고정해 주세요.

현재 종료일 도달 시 만료종료일 기준 시간 트리거 표현만으로는 경계 시점(예: 자정 기준, 타임존, inclusive/exclusive)을 테스트에서 동일하게 재현하기 어렵습니다. 만료 전환 기준 시각을 단일 문장으로 확정해 주세요.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@specs/005-room-domain/spec.md` around lines 180 - 182, Update FR-021 and
FR-022 to specify a single, unambiguous expiration boundary: state that a room
transitions to "만료" at exactly 00:00:00 UTC on the calendar day after the room's
configured end date (i.e., end date is inclusive through 23:59:59.999 UTC), and
that the time-based scheduler uses UTC for all evaluations (no local timezone
offsets); reference FR-021 and FR-022 so tests and implementations know the
scheduler triggers expiration at 00:00:00 UTC following the inclusive end date.

Comment thread specs/005-room-domain/spec.md
- "새 참여자" 트리거: 방 참여 성공 시 호스트에게 발화.
  참여 취소(나가기)는 미발화 (참여 1회당 1건)
- "모집 조기 마감" 트리거: 호스트가 closeRoomRecruit으로
  RECRUITING -> IN_PROGRESS 전환 시 호스트 제외 참여자에게 발화
- "활동 시작" 트리거: IN_PROGRESS 진입 시 참여자에게 발화
  (조기 마감과 함께 발화될 수 있는 별개 트리거)
- 알림 도메인 PRD(#359)의 트리거 카탈로그(ROOM 9종 중 3종)와 정합
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