feat(B02): 프로젝트 만들 때 시스템 양식 전부를 작업본 · _initial 로 복사 (PLAN 10-5)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015LuapLYqN1GGFD8Y1PStD5
This commit is contained in:
2026-09-25 09:46:57 +09:00
co-authored by Claude Opus 5.5
parent ab810c4a4a
commit a4e8e43e1a
2 changed files with 22 additions and 0 deletions
@@ -2,6 +2,7 @@
from __future__ import annotations
import logging
from datetime import datetime
from pathlib import Path
from typing import Any
@@ -16,6 +17,9 @@ from common_util.common_util_workflow import load_project_workflow
from common_util.common_util_workflow_state import initialize_project_stages
from config.config_db import get_db_pool
from config.config_system import STORAGE_BASE_DIR
from M02_MasterTemplete.M02_Template_Layers import seed_project
logger = logging.getLogger(__name__)
def _build_project_storage(company_id: int, user_id: int, project_id: str) -> tuple[str, Path]:
@@ -40,6 +44,12 @@ def _initialize_project_storage(project_root: Path, project_id: str) -> None:
"stages": [f"{stage}/{subdir}" for stage, subdir in PROJECT_STORAGE_LAYOUT_V2],
},
)
# 마스터 템플릿 — 시스템 양식 전부를 작업본 + `_initial/` 로(회사 공식이 있어도 시스템).
# 복사가 실패해도 프로젝트는 만듦 — 읽는 쪽이 시스템 양식으로 떨어짐.
try:
seed_project(project_root)
except OSError:
logger.exception("프로젝트 양식 복사 실패: project_id=%s", project_id)
async def create_project(