Skip to content

Commit 878e3d6

Browse files
authored
Merge pull request #83 from dev-wooyeon/codex/ui-renewal-pr
feat(app): Agentation 흐름 개선과 블로그 업데이트
2 parents f08446e + 6c24599 commit 878e3d6

5 files changed

Lines changed: 101 additions & 101 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ next-env.d.ts
4141
.sisyphus/
4242
.claude/
4343
/.agentation/
44+
.idea

AGENTS.md

Lines changed: 38 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,38 @@
1-
# PROJECT KNOWLEDGE BASE
2-
3-
**Generated:** 2026-02-27
4-
**Commit:** 2669f50
5-
**Branch:** master
6-
7-
## OVERVIEW
8-
9-
Modern tech blog platform built on Next.js App Router with MDX-based content, interactive visualization components, analytics tracking, and a token-driven design system.
10-
11-
## STRUCTURE
12-
13-
```
14-
eunu.log/
15-
├── src/ # Source code
16-
│ ├── app/ # Next.js App Router pages
17-
│ ├── core/ # App config/provider composition
18-
│ ├── domains/ # Cross-feature domain contracts/schema
19-
│ ├── features/ # Feature domains (blog/resume/search/home)
20-
│ ├── shared/ # Shared modules (analytics/layout/ui/providers/seo/types)
21-
│ ├── components/ # Visualization-heavy components
22-
│ ├── styles/ # Design tokens and global styles
23-
│ └── (co-located tests + shared/testing helpers)
24-
├── tests/ # Centralized e2e tests (Playwright)
25-
├── internal/ # Internal scripts and linting configuration
26-
├── posts/ # Blog posts (MDX + metadata)
27-
├── public/ # Static assets
28-
├── docs/ # Project documentation
29-
└── (no .agent directory) # AI collaboration rules are documented under docs/
30-
```
31-
32-
## WHERE TO LOOK
33-
34-
| Task | Location | Notes |
35-
| ------------------ | ----------------- | -------------------------------------------------- |
36-
| Pages & Routing | `src/app/` | Next.js App Router with static generation + handlers |
37-
| Components | `src/features/`, `src/shared/`, `src/components/visualization/` | Feature-first + shared modules + visualization |
38-
| Content Processing | `src/features/blog/services/` | MDX feed repository, markdown parsing |
39-
| Styling | `src/styles/` | CSS variables, Tailwind integration |
40-
| Blog Content | `posts/` | MDX files with separate metadata |
41-
| Configuration | Root | `next.config.mjs`, `package.json`, `tsconfig.json` |
42-
| Internal Tooling | `internal/` | Scripts + lint/spell config |
43-
44-
## CONVENTIONS
45-
46-
**Content Structure:** Each blog post uses folder structure: `posts/[slug]/index.mdx + meta.json`
47-
**Component Organization:** Feature-first (`src/features`) + shared modules (`src/shared`) with index.ts exports
48-
**Styling:** CSS variables + Tailwind CSS hybrid approach
49-
**Visualization:** Interactive visualization components live in `src/components/visualization/` and should use client runtime when browser APIs are required
50-
51-
## ANTI-PATTERNS (THIS PROJECT)
52-
53-
- **NEVER** use arbitrary Tailwind values like `p-[13px]` - use standard classes only
54-
- **NEVER** use raw `requestAnimationFrame` loops in React UI when framework lifecycle hooks can be used
55-
- **NEVER** place visualization/animation-heavy components outside `src/components/visualization/` without clear reason
56-
- **NEVER** use `any` type - use `unknown` or proper types
57-
- **NEVER** ship client effects that drop below smooth interaction on mobile
58-
59-
## UNIQUE STYLES
60-
61-
- Dual root layout pattern (`#app-root` + `#overlay-root`) for modal management
62-
- Folder-based content organization with separated metadata
63-
- CSS variable-driven design system integrated with Tailwind
64-
- Custom webpack MDX processing instead of Next.js built-in MDX
65-
66-
## COMMANDS
67-
68-
```bash
69-
# Development (uses webpack flag)
70-
npm run dev
71-
72-
# Build (uses webpack flag)
73-
npm run build
74-
75-
# Testing (Vitest, not Jest)
76-
npm test
77-
78-
# Bundle analysis
79-
ANALYZE=true npm run build
80-
```
81-
82-
## NOTES
83-
84-
- Uses Vitest instead of Jest for testing
85-
- Uses Playwright for mobile-focused e2e coverage
86-
- Webpack flag suggests Turbopack compatibility issues
87-
- No CI/CD setup - relies on Vercel auto-deployment
88-
- Korean language content support in feeds
89-
- Current app dependencies include Next.js 16 and React 19
90-
- AI collaboration guide: `docs/guides/ai-collaboration.md`
1+
# Repository Guidelines
2+
3+
## Always-Follow Rules
4+
- Keep changes minimal and scoped to the task. Do not edit unrelated files.
5+
- Preserve the current MDX pipeline. MDX must stay on the custom webpack rule with `@mdx-js/loader` in `next.config.mjs`; do not switch to Next.js built-in MDX unless the whole content pipeline is intentionally migrated.
6+
- Keep visualization-heavy UI in `src/components/visualization/`. Do not move that code to other folders without a clear architectural reason.
7+
- Never use `any`. Use concrete types or `unknown` with narrowing.
8+
- Never use arbitrary Tailwind values such as `p-[13px]`. Use standard utilities, shared tokens, and existing style patterns.
9+
- Do not replace feature-first structure with flat shared folders. Keep code in `src/features/`, `src/shared/`, and `src/domains/` by responsibility.
10+
- Preserve blog content structure as `posts/**/index.mdx` with nearby `meta.json`, including nested series directories when present.
11+
12+
## Project Structure
13+
- `src/app/` — Next.js App Router pages, layouts, handlers
14+
- `src/core/` — app-level providers and configuration composition
15+
- `src/domains/` — cross-feature contracts and schemas
16+
- `src/features/` — feature modules such as blog, home, resume, and search
17+
- `src/shared/` — reusable UI, layout, analytics, SEO, and providers
18+
- `src/components/visualization/` — animation and visualization-heavy components
19+
- `src/styles/` — design tokens and global styles
20+
- `posts/` — blog content, series entries, and metadata managed as nested `index.mdx` + `meta.json`
21+
- `tests/` — Playwright end-to-end coverage
22+
- `internal/` — scripts and tool configuration
23+
24+
## Development Commands
25+
- `npm run dev` — run the local dev server with webpack
26+
- `npm run build` — create the production build
27+
- `npm run lint` — run ESLint on source files
28+
- `npm run lint:css:syntax` — check CSS syntax rules
29+
- `npm run test:unit` — run Vitest unit tests
30+
- `npm run test:components` — run component-focused Vitest tests
31+
- `npm run test:e2e` — run Playwright scenarios
32+
- `npm run test:ci` — run the main CI-equivalent validation set
33+
34+
## Style & Testing
35+
Use TypeScript with 2-space indentation, semicolons, single quotes, trailing commas (`es5`), and 80-column width; Prettier enforces this. Name components in `PascalCase`, hooks in `camelCase` with a `use` prefix, and tests as `*.test.ts` or `*.test.tsx`. Add targeted Vitest or Playwright coverage when changing logic, UI behavior, parsers, or app actions. Before opening a PR, run `npm run build` and the most relevant test command for the change.
36+
37+
## Commits & PRs
38+
Use commit messages like `type(scope): concise description`, for example `fix(home): preview 배포 타입 오류 수정`. Common types include `feat`, `fix`, `refactor`, `test`, and `chore`. Use branch names like `codex/<task>`. Follow `.github/pull_request_template.md`, link related issues or PRs, and include screenshots when UI changes are visible. Confirm mobile/desktop and dark/light behavior when layout or navigation changes.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Refactor to Standard Next.js Structure
2+
3+
## 1. Goal
4+
Simplify the current somewhat over-engineered (FSD/DDD-like) directory structure (`src/domains`, `src/features`, `src/core`, `src/shared`) into a flatter, more standard Next.js application structure. This will reduce cognitive load, make it easier to locate files, and improve maintainability for a personal blog project.
5+
6+
## 2. Scope
7+
- Reorganize directories inside `src/` to follow a standard Next.js pattern (`app`, `components`, `lib`, `hooks`, `types`).
8+
- Migrate existing UI components from `src/features/*/ui`, `src/shared/ui`, `src/shared/layout` to `src/components/*`.
9+
- Migrate business logic, API clients, and utilities from `src/features/*/services`, `src/shared/analytics`, `src/shared/integrations` to `src/lib/*`.
10+
- Migrate types and models from `src/domains/*/model`, `src/features/*/model` to a top-level `src/types` or colocated with features in `lib`.
11+
- Migrate configurations and providers from `src/core`, `src/shared/providers` to `src/components/providers` or `src/lib/config`.
12+
- Update all internal import paths to reflect the new structure.
13+
- Update `ARCHITECTURE.md` to document the new, simplified structure.
14+
- Run tests and linters to ensure nothing is broken.
15+
16+
## 3. Constraints
17+
- The Next.js `app` router structure (`src/app/**`) itself remains mostly unchanged, except for import updates.
18+
- The `posts/` directory and its content pipeline remain unchanged.
19+
- The styling approach (Tailwind + CSS variables in `src/styles`) remains unchanged.
20+
- No new features or bug fixes should be introduced during this refactoring. It is a pure structural change.
21+
22+
## 4. Milestones
23+
- **Phase 1: Preparation:**
24+
- Create the new base directories (`src/components`, `src/lib`, `src/types`, `src/hooks`).
25+
- **Phase 2: Types & Models Migration:**
26+
- Move files from `src/domains/*/model/*` and `src/features/*/model/*` to `src/types/*` or `src/lib/*`.
27+
- Fix import paths for these types.
28+
- **Phase 3: Lib & Utilities Migration:**
29+
- Move files from `src/features/*/services/*` to `src/lib/content/` (or similar).
30+
- Move files from `src/shared/integrations/*`, `src/shared/analytics/*`, `src/shared/seo/*` to `src/lib/*`.
31+
- Move utility functions to `src/lib/utils.ts`.
32+
- **Phase 4: Component Migration:**
33+
- Move common UI components from `src/shared/ui/*` to `src/components/ui/`.
34+
- Move layout components from `src/shared/layout/*` to `src/components/layout/`.
35+
- Move feature-specific UI from `src/features/*/ui/*` to `src/components/[feature]/`.
36+
- Move `src/core/providers`, `src/shared/providers` to `src/components/providers/`.
37+
- **Phase 5: Cleanup & Update Documentation:**
38+
- Delete empty old directories (`src/domains`, `src/features`, `src/shared`, `src/core`).
39+
- Update `ARCHITECTURE.md` to reflect the new structure.
40+
- **Phase 6: Verification:**
41+
- Run all tests (`npm run test:ci`).
42+
- Verify local build (`npm run build`).
43+
44+
## 5. Verification
45+
- All TypeScript compiler checks must pass (`npm run lint`).
46+
- All unit and E2E tests must pass (`npm run test:ci`).
47+
- The development server must start without errors (`npm run dev`).
48+
- A production build must succeed (`npm run build`).
49+
- The application (both UI and functionality like view counts) must work identically to before.
50+
51+
## 6. Rollback
52+
- Since the project is managed by Git, if any issues arise or the refactoring becomes too complex, the rollback strategy is to hard reset to the commit prior to starting this execution plan (`git reset --hard HEAD`).

posts/블로그-시스템-구축기/index.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -788,22 +788,22 @@ Phase 1~5로 나눠 단계별로 개선했어요.
788788

789789
### 9.1 기능 추가
790790

791-
- [ ] 검색 기능 (Algolia or local index)
792-
- [ ] RSS Feed 생성
793-
- [ ] 댓글 시스템 (giscus)
794-
- [ ] OG Image 자동 생성
791+
- 검색 기능 (Algolia or local index)
792+
- RSS Feed 생성
793+
- 댓글 시스템 (giscus)
794+
- OG Image 자동 생성
795795

796796
### 9.2 성능 최적화
797797

798-
- [ ] Image 최적화 (WebP, AVIF)
799-
- [ ] Critical CSS inline
800-
- [ ] Font preloading 전략
798+
- Image 최적화 (WebP, AVIF)
799+
- Critical CSS inline
800+
- Font preloading 전략
801801

802802
### 9.3 개발 경험
803803

804-
- [ ] Storybook 도입
805-
- [ ] E2E 테스트 (Playwright)
806-
- [ ] 단위 테스트 커버리지 80%+
804+
- Storybook 도입
805+
- E2E 테스트 (Playwright)
806+
- 단위 테스트 커버리지 80%+
807807

808808
---
809809

tests/e2e/smoke/navigation-ia.smoke.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { expect, test } from '@playwright/test';
33
test.describe('Navigation IA', () => {
44
test('@smoke 모바일 하단 네비 4탭이 동작해요', async ({ page }, testInfo) => {
55
test.skip(!testInfo.project.use.isMobile, '모바일 프로젝트 전용 테스트예요.');
6-
76
await page.goto('/');
87
await expect(
98
page.getByRole('navigation', { name: '모바일 하단 네비게이션' })

0 commit comments

Comments
 (0)