Mirror Context
As development with AI increases, I felt that how we maintain project context is becoming an important issue.
So I organized an idea called Mirror Context: managing project context by keeping a document structure that corresponds to the code structure.
It is not yet a proven method, but I think it can be considered as one approach to managing context in the era of developing together with AI.
Mirror Context Structure Example
my-project/
│
├─ README.md
├─ package.json
├─ docker-compose.yml
│
├─ backend/
│ ├─ src/
│ │ ├─ api/
│ │ │ ├─ userController.ts
│ │ │ └─ authRoutes.ts
│ │ │
│ │ ├─ services/
│ │ │ └─ authService.ts
│ │ │
│ │ ├─ models/
│ │ │ └─ userModel.ts
│ │ │
│ │ └─ utils/
│ │ └─ validator.ts
│ │
│ ├─ config/
│ │ └─ env.ts
│ │
│ └─ tests/
│ ├─ userController.test.ts
│ └─ authService.test.ts
│
├─ frontend/
│ ├─ src/
│ │ ├─ components/
│ │ │ └─ LoginForm.tsx
│ │ │
│ │ ├─ pages/
│ │ │ └─ login.tsx
│ │ │
│ │ └─ utils/
│ │ └─ apiClient.ts
│ │
│ └─ public/
│
└─ mirror_docs/
│
├─ RULES.md
├─ CONVENTION.md
├─ ARCHITECTURE.md
│
├─ GLOBAL_PLAN.md
├─ INDEX.md
├─ MAP.md
│
├─ TEST_REPORT.md
├─ LEARNINGS.md
├─ DEBUG_LOG.md
│
├─ backend/
│ ├─ EPIC.md
│ │
│ ├─ src/
│ │ ├─ EPIC.md
│ │ │
│ │ ├─ api/
│ │ │ ├─ EPIC.md
│ │ │ ├─ userController.md
│ │ │ ├─ userControllerPlan.md
│ │ │ ├─ authRoutes.md
│ │ │ └─ authRoutesPlan.md
│ │ │
│ │ ├─ services/
│ │ │ ├─ EPIC.md
│ │ │ ├─ authService.md
│ │ │ └─ authServicePlan.md
│ │ │
│ │ ├─ models/
│ │ │ ├─ EPIC.md
│ │ │ ├─ userModel.md
│ │ │ └─ userModelPlan.md
│ │ │
│ │ └─ utils/
│ │ ├─ EPIC.md
│ │ ├─ validator.md
│ │ └─ validatorPlan.md
│ │
│ ├─ config/
│ │ └─ EPIC.md
│ │
│ └─ tests/
│ ├─ EPIC.md
│ ├─ userController.test.md
│ └─ authService.test.md
│
└─ frontend/
├─ EPIC.md
│
├─ src/
│ ├─ EPIC.md
│ │
│ ├─ components/
│ │ ├─ EPIC.md
│ │ ├─ LoginForm.md
│ │ └─ LoginFormPlan.md
│ │
│ ├─ pages/
│ │ ├─ EPIC.md
│ │ ├─ login.md
│ │ └─ loginPlan.md
│ │
│ └─ utils/
│ ├─ EPIC.md
│ ├─ apiClient.md
│ └─ apiClientPlan.md
│
└─ public/
└─ EPIC.md
Mirror Context
AI를 사용한 개발이 늘어나면서 프로젝트의 맥락(context)을 어떻게 유지할 것인가가 중요한 문제라고 느꼈습니다.
그래서 코드 구조에 대응되는 문서 구조를 함께 두어 프로젝트의 맥락을 관리하는 방식, Mirror Context라는 아이디어를 정리해 보았습니다.
아직 검증된 방법은 아니지만, AI와 함께 개발하는 시대에 context를 관리하는 하나의 접근으로 생각해 볼 수 있을 것 같습니다.
Mirror Context 구조 예시
my-project/
│
├─ README.md
├─ package.json
├─ docker-compose.yml
│
├─ backend/
│ ├─ src/
│ │ ├─ api/
│ │ │ ├─ userController.ts
│ │ │ └─ authRoutes.ts
│ │ │
│ │ ├─ services/
│ │ │ └─ authService.ts
│ │ │
│ │ ├─ models/
│ │ │ └─ userModel.ts
│ │ │
│ │ └─ utils/
│ │ └─ validator.ts
│ │
│ ├─ config/
│ │ └─ env.ts
│ │
│ └─ tests/
│ ├─ userController.test.ts
│ └─ authService.test.ts
│
├─ frontend/
│ ├─ src/
│ │ ├─ components/
│ │ │ └─ LoginForm.tsx
│ │ │
│ │ ├─ pages/
│ │ │ └─ login.tsx
│ │ │
│ │ └─ utils/
│ │ └─ apiClient.ts
│ │
│ └─ public/
│
└─ mirror_docs/
│
├─ RULES.md
├─ CONVENTION.md
├─ ARCHITECTURE.md
│
├─ GLOBAL_PLAN.md
├─ INDEX.md
├─ MAP.md
│
├─ TEST_REPORT.md
├─ LEARNINGS.md
├─ DEBUG_LOG.md
│
├─ backend/
│ ├─ EPIC.md
│ │
│ ├─ src/
│ │ ├─ EPIC.md
│ │ │
│ │ ├─ api/
│ │ │ ├─ EPIC.md
│ │ │ ├─ userController.md
│ │ │ ├─ userControllerPlan.md
│ │ │ ├─ authRoutes.md
│ │ │ └─ authRoutesPlan.md
│ │ │
│ │ ├─ services/
│ │ │ ├─ EPIC.md
│ │ │ ├─ authService.md
│ │ │ └─ authServicePlan.md
│ │ │
│ │ ├─ models/
│ │ │ ├─ EPIC.md
│ │ │ ├─ userModel.md
│ │ │ └─ userModelPlan.md
│ │ │
│ │ └─ utils/
│ │ ├─ EPIC.md
│ │ ├─ validator.md
│ │ └─ validatorPlan.md
│ │
│ ├─ config/
│ │ └─ EPIC.md
│ │
│ └─ tests/
│ ├─ EPIC.md
│ ├─ userController.test.md
│ └─ authService.test.md
│
└─ frontend/
├─ EPIC.md
│
├─ src/
│ ├─ EPIC.md
│ │
│ ├─ components/
│ │ ├─ EPIC.md
│ │ ├─ LoginForm.md
│ │ └─ LoginFormPlan.md
│ │
│ ├─ pages/
│ │ ├─ EPIC.md
│ │ ├─ login.md
│ │ └─ loginPlan.md
│ │
│ └─ utils/
│ ├─ EPIC.md
│ ├─ apiClient.md
│ └─ apiClientPlan.md
│
└─ public/
└─ EPIC.md