Files
clean-architecture-frontend…/config/repository-layout.json
T
donghyeon.kang 79dc945a67 refactor(layout): 루트 경로 목록을 등록부 하나에서 고르고 schemas/를 옮긴다
루트 항목 하나를 옮기려면 코드 7곳의 루트 경로 목록을 같이 고쳐야
했다(복사 대상, 비밀값 검사 범위, 공급망 시험의 필수 입력, 이력 문서
검사, 규모 입력, vite 입력, TS 전용 규칙). 서로 다른 부분집합이고 한
곳에서 선언하지 않았다. 목록이 갈라져 공급망 생성이 깨진 적도 있다
(removal-fixture.ts 주석). 루트에는 JSON Schema 5개만 담은 `schemas/`가
`config/` 옆에 따로 있었다. `artifacts/`(출력 폴더)에는 사람이 쓴 수동
a11y 기록이, `config/hosting/`(호스트 계약)에는 시험 fixture가 섞였다.

고른 방법(design-docs repo-structure/04-frontend-layout.md 9.2절 3단계,
11절 R1·R2, 소유자 승인 2026-11-07):
- `config/repository-layout.json`이 루트 항목마다 종류·역할·읽는 곳과
  들어가는 목록(`sets`, 항목 안 경로는 `setPaths`)을 적는다.
  `scripts/lib/repository-layout.ts`가 읽고 검증한다. 6곳은 이름 붙은
  집합을 고른다. JSON인 비밀값 검사 정책은 집합의 사본을 두고 시험이
  같은지 본다(정책 파일은 릴리스 후보에 실려 형식을 바꾸지 않았다).
  공급망 시험의 필수 입력 목록은 그 시험으로 대신한다.
- `tests/unit/repository-layout.test.ts`: 등록부에 없는 루트 항목이
  추적되면 실패(R1). 7곳이 등록부 모듈을 쓰고 루트 이름 둘 이상의
  문자열 배열을 갖지 않는지(R2).
- `schemas/artifacts/` → `config/schemas/artifacts/`, recipe 카탈로그
  스키마 → `config/schemas/recipes/`. 정책 입력 순서(ASCII)에 맞춰
  `config/schemas/`가 `config/security/` 앞에 온다.
- 수동 a11y 기록 3개 → `docs/accessibility/route-reviews/`. `artifacts/`는
  `.gitkeep`만 추적한다. 기록은 단위 시험이 읽어서 drill 사본에도
  복사한다(`fixture-copy` 집합의 `docs/accessibility/route-reviews`).
- `config/hosting/response-headers.fixture.json` →
  `tests/fixtures/hosting/response-headers.json`.

버린 것: 비밀값 검사 정책이 집합 이름을 참조하게 바꾸는 방법. 정책
파일은 릴리스 후보와 로컬 증거 평가가 읽는 형식이라 바꾸면 릴리스
증거 계약이 바뀐다. 루트 항목이 지워졌는데 등록부에 남는 경우는
시험하지 않았다. drill 사본은 일부만 복사해 그 방향을 볼 수 없다.
그런 항목은 그 집합을 쓰는 곳(복사, 비밀값 검사)에서 실패한다.

위험: 하네스 작업(fe-c)이 더할 `AGENTS.md`·`.claude/`를 미리 등록했다
(optional). 등록부가 이력 문서(`SPEC.md`)와 `CLAUDE.md` 이름을 적어서
이력 문서 검사에서 등록부 파일은 뺐다. 다운스트림은 자기 루트 항목을
등록부에 더해야 한다(CHANGELOG). CI 계약 기준선을 다시 받았다(a11y
기록 산출물 id·경로).

검증(desktop): 아래 4단계 커밋까지 쌓은 트리에서 test:unit,
check:types, check:ci, lint, verify:documentation을 돌렸다(그 커밋에
적음). 이 커밋 단독으로 test:unit·check:ci·check:types를 돌렸다.

Refs: design-docs repo-structure/04-frontend-layout.md 2.4·9.2·11절, README.md 3.4절
2026-11-08 17:41:07 +09:00

321 lines
11 KiB
JSON

{
"schemaVersion": 1,
"kinds": {
"source": "코드와 시험. 계층과 도구가 읽는다",
"tool-convention": "도구가 루트에서 이 이름으로 찾는 설정 파일·폴더",
"gate-input": "게이트와 런타임이 읽는 기준 데이터",
"document": "사람이 읽는 문서",
"history": "끝난 라운드의 기록. 이력 폴더로 옮길 대상이다(R10)",
"output": "실행 출력. 추적하는 것은 `.gitkeep`뿐이다(R3)"
},
"sets": {
"fixture-copy": "제거·생성 drill과 사본 시험이 복사하는 것(scripts/lib/removal-fixture.ts)",
"fixture-documents": "기능을 더하거나 지우는 drill이 문서까지 맞는지 보려고 더 복사하는 문서(scripts/lib/removal-fixture.ts)",
"secret-scan": "비밀값 검사와 공급망 목록의 범위. config/security/secret-scan-policy.json의 trackedRoots가 이 집합과 같아야 한다",
"history-free": "이력 문서를 읽으면 안 되는 코드(tests/unit/deletable-history-documents.test.ts)",
"scale-source": "규모 증거에서 '지금 코드'를 정하는 입력(scripts/verify-extreme-scale.ts)",
"vite-build": "vite build가 읽는 입력(scripts/lib/vite-build-inputs.ts)",
"typescript-only": "JS 파일을 두면 안 되는 곳(scripts/check-architecture.ts)"
},
"entries": [
{
"path": ".claude",
"kind": "tool-convention",
"role": "Claude Code 설정·규칙·스킬. 하네스 작업(fe-c)이 더한다",
"readBy": "Claude Code",
"optional": true
},
{
"path": ".dependency-cruiser.json",
"kind": "tool-convention",
"role": "import 규칙과 kernel 예외의 정본",
"readBy": "scripts/check-architecture.ts (FE-GATE-010)",
"sets": ["fixture-copy", "secret-scan", "history-free", "scale-source"]
},
{
"path": ".env.example",
"kind": "tool-convention",
"role": "빌드 시점 공개 변수의 견본",
"readBy": "Vite(VITE_*), 사람"
},
{
"path": ".gitea",
"kind": "tool-convention",
"role": "Gitea Actions workflow. config/ci/gates.json에서 생성한다",
"readBy": "Gitea Actions, scripts/generate-ci-workflow.ts, check:ci (FE-GATE-010)",
"sets": ["fixture-copy", "history-free"],
"setPaths": {
"secret-scan": [".gitea/workflows/quality-gates.yml"]
}
},
{
"path": ".gitignore",
"kind": "tool-convention",
"role": "추적하지 않을 파일",
"readBy": "git",
"sets": ["fixture-copy"]
},
{
"path": ".npmrc",
"kind": "tool-convention",
"role": "pnpm 설정",
"readBy": "pnpm",
"sets": ["fixture-copy", "secret-scan"]
},
{
"path": ".nvmrc",
"kind": "tool-convention",
"role": "Node 버전",
"readBy": "nvm, CI",
"sets": ["fixture-copy", "secret-scan"]
},
{
"path": ".storybook",
"kind": "tool-convention",
"role": "Storybook 설정. 갤러리와 visual 골든의 대상",
"readBy": "storybook, build:storybook (FE-GATE-011)",
"sets": ["fixture-copy", "secret-scan", "scale-source", "typescript-only"]
},
{
"path": "AGENTS.md",
"kind": "tool-convention",
"role": "에이전트 진입 문서. 하네스 작업(fe-c)이 더한다",
"readBy": "코딩 에이전트",
"optional": true
},
{
"path": "CHANGELOG.md",
"kind": "document",
"role": "버전별 변경과 다운스트림이 할 일",
"readBy": "tests/unit/changelog-review-ids.test.ts, 사람",
"sets": ["fixture-documents"]
},
{
"path": "CLAUDE.md",
"kind": "tool-convention",
"role": "Claude Code 진입 문서",
"readBy": "Claude Code"
},
{
"path": "PRODUCT.md",
"kind": "tool-convention",
"role": "제품 맥락. 디자인 도구가 루트에서 찾는다",
"readBy": "디자인 스킬"
},
{
"path": "README.md",
"kind": "document",
"role": "시작·설정·검증",
"readBy": "verify:documentation (FE-GATE-017), 사람",
"sets": ["fixture-documents"]
},
{
"path": "SPEC.md",
"kind": "history",
"role": "2026-09-25 라운드 요구사항. 문서 체계 작업(fe-b)이 이력 폴더로 옮기고 이 항목을 뺀다",
"readBy": "사람"
},
{
"path": "artifacts",
"kind": "output",
"role": "게이트와 시험의 실행 출력",
"readBy": "scripts/run-ci-gate.ts, CI 업로드"
},
{
"path": "config",
"kind": "gate-input",
"role": "게이트·런타임·보안·성능의 기준 데이터와 JSON Schema(config/schemas)",
"readBy": "scripts/, tests/, src/",
"sets": ["fixture-copy", "secret-scan", "history-free", "scale-source"]
},
{
"path": "docs",
"kind": "document",
"role": "매뉴얼·설계·운영 문서와 수동 접근성 검토 기록",
"readBy": "verify:documentation (FE-GATE-017), review:a11y-manual (FE-GATE-009·028)",
"sets": ["fixture-documents"],
"setPaths": {
"fixture-copy": ["docs/accessibility/route-reviews"]
}
},
{
"path": "eslint.config.ts",
"kind": "tool-convention",
"role": "lint 규칙",
"readBy": "eslint (FE-GATE-002)",
"sets": ["fixture-copy", "secret-scan", "history-free", "scale-source"]
},
{
"path": "index.html",
"kind": "tool-convention",
"role": "Vite 진입 HTML",
"readBy": "Vite",
"sets": ["fixture-copy", "secret-scan", "vite-build"]
},
{
"path": "package.json",
"kind": "tool-convention",
"role": "의존성과 package script",
"readBy": "pnpm, 모든 게이트",
"sets": ["fixture-copy", "secret-scan", "history-free", "scale-source", "vite-build"]
},
{
"path": "playwright.capabilities.config.ts",
"kind": "tool-convention",
"role": "브라우저 capability 시험 설정",
"readBy": "test:browser-capabilities (FE-GATE-008)",
"sets": ["fixture-copy", "secret-scan"]
},
{
"path": "playwright.config.ts",
"kind": "tool-convention",
"role": "e2e 설정(빌드 미리보기)",
"readBy": "test:e2e (FE-GATE-008)",
"sets": ["fixture-copy", "secret-scan", "history-free"]
},
{
"path": "playwright.dev.config.ts",
"kind": "tool-convention",
"role": "dev 서버 대상 e2e 설정",
"readBy": "test:e2e:dev",
"sets": ["fixture-copy", "secret-scan"]
},
{
"path": "playwright.storybook.config.ts",
"kind": "tool-convention",
"role": "Storybook 정적 빌드 시험 설정",
"readBy": "test:storybook (FE-GATE-008)",
"sets": ["fixture-copy", "secret-scan"]
},
{
"path": "playwright.visual.config.ts",
"kind": "tool-convention",
"role": "visual 골든 설정",
"readBy": "test:visual (FE-GATE-008)",
"sets": ["fixture-copy", "secret-scan"]
},
{
"path": "pnpm-lock.yaml",
"kind": "tool-convention",
"role": "잠금 파일",
"readBy": "pnpm, 공급망 생성",
"sets": ["fixture-copy", "secret-scan", "scale-source"]
},
{
"path": "pnpm-workspace.yaml",
"kind": "tool-convention",
"role": "pnpm 11 설정",
"readBy": "pnpm, scripts/lib/package-script-graph.ts",
"sets": ["fixture-copy", "secret-scan"]
},
{
"path": "public",
"kind": "tool-convention",
"role": "개발 서버가 서빙하는 런타임 문서",
"readBy": "Vite",
"sets": ["fixture-copy", "secret-scan", "vite-build"]
},
{
"path": "recipes",
"kind": "source",
"role": "선택 기능 설치 원본. 기본 빌드에 들어가지 않는다",
"readBy": "tsconfig.test.json, test:recipes (FE-GATE-007), check:optional-recipes (FE-GATE-012)",
"optional": true,
"sets": ["fixture-copy", "secret-scan", "history-free", "scale-source", "typescript-only"]
},
{
"path": "renovate.json",
"kind": "tool-convention",
"role": "보안 업데이트 봇 설정",
"readBy": "Renovate"
},
{
"path": "scripts",
"kind": "source",
"role": "게이트·생성기·drill 스크립트",
"readBy": "package.json scripts",
"sets": ["fixture-copy", "secret-scan", "history-free", "scale-source", "typescript-only"],
"setPaths": {
"vite-build": ["scripts/lib/run-isolation.ts", "scripts/lib/vite-module-inventory.ts"]
}
},
{
"path": "src",
"kind": "source",
"role": "앱 계층",
"readBy": "빌드와 모든 게이트",
"sets": ["fixture-copy", "secret-scan", "history-free", "scale-source", "vite-build", "typescript-only"]
},
{
"path": "tests",
"kind": "source",
"role": "시험과 fixture",
"readBy": "test:* scripts, playwright 설정",
"sets": ["fixture-copy", "secret-scan", "history-free", "scale-source", "typescript-only"]
},
{
"path": "tsconfig.app.json",
"kind": "tool-convention",
"role": "src 타입 검사(DOM, Node 타입 없음)",
"readBy": "check:types:app (FE-GATE-003), Vite",
"sets": ["fixture-copy", "secret-scan", "scale-source", "vite-build"]
},
{
"path": "tsconfig.base.json",
"kind": "tool-convention",
"role": "공통 컴파일 옵션",
"readBy": "다른 tsconfig의 extends",
"sets": ["fixture-copy", "secret-scan", "vite-build"]
},
{
"path": "tsconfig.json",
"kind": "tool-convention",
"role": "편집기용 solution tsconfig(files 없음, references만)",
"readBy": "편집기",
"sets": ["fixture-copy", "secret-scan", "scale-source"]
},
{
"path": "tsconfig.node.json",
"kind": "tool-convention",
"role": "scripts·설정 파일 타입 검사(NodeNext)",
"readBy": "check:types:node (FE-GATE-003)",
"sets": ["fixture-copy", "secret-scan", "scale-source"]
},
{
"path": "tsconfig.service-worker.json",
"kind": "tool-convention",
"role": "Service Worker 타입 검사(WebWorker, DOM 없음)",
"readBy": "check:types:service-worker (FE-GATE-003)",
"sets": ["fixture-copy", "secret-scan"]
},
{
"path": "tsconfig.test.json",
"kind": "tool-convention",
"role": "tests·recipes·시험 설정 파일 타입 검사",
"readBy": "check:types:test (FE-GATE-003)",
"sets": ["fixture-copy", "secret-scan", "scale-source"]
},
{
"path": "vite.config.ts",
"kind": "tool-convention",
"role": "앱 빌드",
"readBy": "Vite",
"sets": ["fixture-copy", "secret-scan", "history-free", "scale-source", "vite-build"]
},
{
"path": "vite.service-worker.config.ts",
"kind": "tool-convention",
"role": "Service Worker 빌드",
"readBy": "scripts/build-frontend.ts",
"sets": ["fixture-copy", "secret-scan"]
},
{
"path": "vitest.config.ts",
"kind": "tool-convention",
"role": "단위·컴포넌트 시험 설정",
"readBy": "scripts/run-vitest.ts",
"sets": ["fixture-copy", "secret-scan", "history-free", "scale-source"]
}
]
}