From 91fce428ec5d77e04d53182b1c343e3eb6d167c5 Mon Sep 17 00:00:00 2001 From: corpi Date: Fri, 27 Feb 2026 13:46:27 +0900 Subject: [PATCH] =?UTF-8?q?docs(workflow):=20=EC=BB=A8=ED=85=8D=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EB=A1=9C=EB=93=9C=EB=A5=BC=20=ED=86=A0=ED=81=B0=20?= =?UTF-8?q?=EC=A0=88=EC=95=BD=20=EB=AA=A8=EB=93=9C=EB=A1=9C=20=EC=A0=84?= =?UTF-8?q?=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 맥락: - workFlow 실행 시 매번 여러 문서를 전부 읽어 토큰이 과도하게 소모되는 문제를 줄이기 위해 변경사항: - docs/context_core.md 신설(핵심 규칙 요약본) - docs/workFlow.md를 기본 3문서 + 조건부 로드 방식으로 변경 - docs/README.md에 context_core 및 토큰 절약 로드 원칙 반영 - docs/90_current_state.md에 이번 정책 변경 기록 검증: - 문서 문자 수 기준 로드량 비교 계산 - old_always_chars=6226, new_always_chars=3015 세션-상태: workflow가 토큰 절약형 컨텍스트 로드를 사용함 세션-다음: 조건부 로드 문서 기준을 실제 작업 로그로 튜닝 세션-리스크: work.md 입력이 장문이면 절감 효과가 상대적으로 줄어들 수 있음 --- docs/90_current_state.md | 6 ++++++ docs/README.md | 2 ++ docs/context_core.md | 43 ++++++++++++++++++++++++++++++++++++++++ docs/workFlow.md | 18 +++++++++++------ 4 files changed, 63 insertions(+), 6 deletions(-) create mode 100644 docs/context_core.md diff --git a/docs/90_current_state.md b/docs/90_current_state.md index ebfa7da..c5c5982 100644 --- a/docs/90_current_state.md +++ b/docs/90_current_state.md @@ -7,6 +7,9 @@ Last Updated: 2026-02-27 - 세션 복구 운영 문서 추가: - `docs/06_commit_convention.md` - `docs/07_session_recovery.md` +- 워크플로우 토큰 절약 모드 추가: + - `docs/context_core.md` 신설 + - `docs/workFlow.md`를 기본 3문서 + 조건부 로드로 변경 - 복구 스크립트 추가: - `scripts/session/recover-context.sh` - `npm run session:recover` 명령 추가 @@ -35,6 +38,9 @@ Last Updated: 2026-02-27 - `docs/06_commit_convention.md` - `docs/07_session_recovery.md` +- `docs/context_core.md` +- `docs/workFlow.md` +- `docs/README.md` - `.gitmessage-session.txt` - `scripts/session/recover-context.sh` - `package.json` diff --git a/docs/README.md b/docs/README.md index acd7289..b1b4f3b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -9,6 +9,7 @@ Codex CLI가 중간에 끊겨도 같은 품질로 작업을 이어가기 위한 3. [02_arch_fsd_rules.md](./02_arch_fsd_rules.md) 4. [03_routes_map.md](./03_routes_map.md) 5. [90_current_state.md](./90_current_state.md) +6. [context_core.md](./context_core.md) ## 추가 실무 가이드 @@ -25,3 +26,4 @@ Codex CLI가 중간에 끊겨도 같은 품질로 작업을 이어가기 위한 - `page.tsx`는 조합만 담당하고 비즈니스 로직은 `features/widgets/entities`로 이동한다. - 작업 종료 시 `90_current_state.md`를 반드시 업데이트한다. - 세션 복구는 `npm run session:recover`로 시작한다. +- `workFlow.md` 실행 시 기본은 `work + 90_current_state + context_core`만 로드한다. diff --git a/docs/context_core.md b/docs/context_core.md new file mode 100644 index 0000000..fe949d6 --- /dev/null +++ b/docs/context_core.md @@ -0,0 +1,43 @@ +# Context Core (Token-Saving) + +세션 시작 시 가장 먼저 읽는 핵심 요약본이다. + +## 제품/범위 + +- VibeRoom Web은 UI 목업 중심 프로젝트다. +- 실제 기능(타이머 카운트다운, 오디오 엔진, 서버/DB)은 구현하지 않는다. +- 더미 데이터 + 토스트 + 화면 상호작용 중심으로 구현한다. + +## FSD 핵심 규칙 + +- `app/page.tsx`는 조합만 담당한다. +- 비즈니스 로직은 `features` 또는 `entities`로 이동한다. +- UI 상태(토글/선택)만 최소 허용한다. +- 파일이 500줄 이상이면 분리한다. +- import 방향: + - `app -> widgets/features/entities/shared` + - `widgets -> features/entities/shared` + - `features -> entities/shared` + - `entities -> shared` + - `shared -> shared/external` + +## UI 핵심 규칙 + +- 톤: 감성/저자극, 과한 대비/강조 금지 +- CTA 위계: Primary 1개 중심, Secondary/Tertiary는 무게 낮게 +- 모바일은 접근성 우선, 데스크톱은 과한 풀폭 버튼 지양 + +## 커밋 규칙 (요약) + +- 주제별 1커밋 +- 한국어 Conventional Commit +- 본문 형식: + - `맥락` + - `변경사항` + - `검증` + - `세션-상태 / 세션-다음 / 세션-리스크` + +## 세션 복구 규칙 + +- 시작: `npm run session:recover` +- 상태판: `docs/90_current_state.md` 기준으로 다음 작업 결정 diff --git a/docs/workFlow.md b/docs/workFlow.md index 7cbcd72..692ef97 100644 --- a/docs/workFlow.md +++ b/docs/workFlow.md @@ -10,14 +10,20 @@ ## 1) 필수 컨텍스트 로드 -작업 시작 전에 아래 문서를 읽고 규칙을 고정한다. +토큰 절약을 위해 기본 로드 + 조건부 로드로 나눠서 읽는다. -- `docs/00_project_brief.md` -- `docs/01_ui_guidelines.md` -- `docs/02_arch_fsd_rules.md` -- `docs/04_coding_rules.md` -- `docs/06_commit_convention.md` +### 기본 로드 (항상) + +- `docs/work.md` - `docs/90_current_state.md` +- `docs/context_core.md` + +### 조건부 로드 (필요할 때만) + +- UI/카피/CTA 변경이 있으면 `docs/01_ui_guidelines.md` +- 구조/FSD/레이어 변경이 있으면 `docs/02_arch_fsd_rules.md` +- 커밋 직전에 `docs/06_commit_convention.md` +- 규칙 충돌/모호함이 있으면 `docs/00_project_brief.md`, `docs/04_coding_rules.md` ## 2) 구현 원칙 (강제)