diff --git a/.dependency-cruiser.json b/.dependency-cruiser.json index 5e19e4f3..e3dab6e9 100644 --- a/.dependency-cruiser.json +++ b/.dependency-cruiser.json @@ -300,11 +300,11 @@ }, { "name": "feature-and-app-roots-do-not-reach-adapters", - "comment": "12-03. The graph checks one edge at a time, so a module that presentation may import must not re-export a concrete adapter: presentation would then reach it with every direct rule passing. That covers the files outside a feature's layer folders (src/features/*.ts, src/features//*.ts), src/contexts and src/apps. Inside a feature, only its adapters/ folder reaches src/adapters; the product composes adapters in bootstrap. Exception: src/features/feature-adapter-contribution.ts imports the InstalledHttpOperationExecutor type that bootstrap hands to feature adapters (type only). Owner: frontend-platform. Revisit when that type moves to an application port.", + "comment": "12-03. The graph checks one edge at a time, so a module that presentation may import must not re-export a concrete adapter: presentation would then reach it with every direct rule passing. That covers every file under src/features outside a feature's adapters/ folder (the root files, and any folder that is not a layer, such as support/: 0929/12-03), src/contexts and src/apps. Inside a feature, only its adapters/ folder reaches src/adapters; the product composes adapters in bootstrap. Exception: src/features/feature-adapter-contribution.ts imports the InstalledHttpOperationExecutor type that bootstrap hands to feature adapters (type only). Owner: frontend-platform. Revisit when that type moves to an application port.", "severity": "error", "from": { - "path": "^src/(features/[^/]+\\.tsx?$|features/[^/]+/[^/]+\\.tsx?$|contexts/|apps/)", - "pathNot": "^src/features/feature-adapter-contribution\\.ts$" + "path": "^src/(features/|contexts/|apps/)", + "pathNot": "^src/features/([^/]+/adapters/|feature-adapter-contribution\\.ts$)" }, "to": { "path": "^src/adapters/" diff --git a/README.md b/README.md index a83ef0c8..e84a8d0b 100644 --- a/README.md +++ b/README.md @@ -333,7 +333,7 @@ bubblewrap may create unprivileged user and network namespaces, which Ubuntu 23.10 and later refuse by default — its first step says so, and `docs/operations/ci-quality-gates.md` lists the fixes). Product checks listed in `config/ci/product-gates.json` (`PRODUCT-GATE-NNN`) run in the workflow's own -`product_merge_gate` job: +`product_merge_gate` job, which the release stage waits for: ```bash for gate in 001 002 003 004 005 006 007 008 009 010 011 012 013 020; do diff --git a/docs/README.md b/docs/README.md index 6435d08c..f2f541aa 100644 --- a/docs/README.md +++ b/docs/README.md @@ -43,8 +43,11 @@ README와 입구 문서는 영어, recipe·ledger·스타일 문서는 한국어 `verify:documentation`은 이 파일과 이 절에서 링크한 문서(폴더 링크는 그 안의 `.md` 전부)에 적힌 repo 경로·링크·package script·FE-GATE ID가 실제로 있는지 검사한다. 명령(인라인 코드와 셸 코드 블록) 안의 경로 인자도 본다. 짝 백엔드 템플릿(`clean-architecture-backend-template`)의 -경로와 링크는 그 checkout이 이 checkout 옆에 있을 때만 확인하고, 없으면 실패 대신 확인하지 -못한 것으로 출력과 `artifacts/quality/documentation-review.json`에 남긴다. `CHANGELOG.md`는 +경로와 링크는 `config/contracts/backend-contract-pin.json`이 고정한 커밋의 트리에서 찾는다. +이 checkout 옆에 있는 짝 checkout의 git 기록을 읽고, 그 작업 트리와 HEAD는 보지 않는다. 짝 +checkout이 없거나 그 커밋이 없으면 실패 대신 확인하지 못한 것으로 출력과 +`artifacts/quality/documentation-review.json`에 남긴다. repo 밖으로 나가는 링크가 짝 저장소를 +가리키지 않으면(저장소 이름 오타 포함) 실패한다. `CHANGELOG.md`는 지난 상태를 적는 문서라 빼고, git이 무시하는 생성 산출물과 복사한 프로젝트가 지운 작업 이력은 없어도 된다. 설명·수치가 코드와 맞는지는 검사하지 않는다. 규칙과 예외의 정본은 `scripts/verify-documentation-readiness.ts`다. diff --git a/docs/architecture/layers.md b/docs/architecture/layers.md index a57351d8..131b3bfc 100644 --- a/docs/architecture/layers.md +++ b/docs/architecture/layers.md @@ -63,7 +63,7 @@ Each row is one `forbidden` rule in `.dependency-cruiser.json`, by its `name`. | `adapter-groups-are-reached-through-their-barrel` | code outside `src/adapters` | adapter files other than a group's `index.ts` and the `storage/indexeddb` and `storage/opfs` sub-barrels | | `features-do-not-import-other-features` | each feature | another feature | | `contexts-do-not-import-other-contexts` | each context | another context | -| `feature-and-app-roots-do-not-reach-adapters` | `src/features/*.ts`, `src/features//*.ts`, `src/contexts`, `src/apps`, except the type-only `src/features/feature-adapter-contribution.ts` | `src/adapters` | +| `feature-and-app-roots-do-not-reach-adapters` | every file in `src/features` outside a feature's `adapters/` folder (the root files and any folder that is not a layer, such as `support/`), `src/contexts`, `src/apps`, except the type-only `src/features/feature-adapter-contribution.ts` | `src/adapters` | | `presentation-does-not-import-apps-or-contexts` | generic and feature presentation, except `src/presentation/routes/app-router.tsx`, which mounts the app's route tree | `src/apps`, `src/contexts` | | `observability-vendors-live-behind-adapters` | code outside `src/adapters` | vendor telemetry SDKs | | `platform-kernel-is-product-neutral` | `src/platform`, except `routing/`, which reads app descriptors by type | features, contexts, apps, adapters, bootstrap, presentation, application | diff --git a/docs/manual/01-add-a-feature.md b/docs/manual/01-add-a-feature.md index ab947f1b..739176ca 100644 --- a/docs/manual/01-add-a-feature.md +++ b/docs/manual/01-add-a-feature.md @@ -380,7 +380,7 @@ projectRequest: (input) => Object.freeze({ - presentation이 기능 `adapters/`를 import하면 `feature-presentation-does-not-know-outbound-adapters`로 막는다. - adapters가 presentation을 import하면 `feature-adapters-do-not-know-presentation`으로 막는다. -- 기능 루트 파일(`feature-module.ts` 등)이 `src/adapters`에 닿으면 `feature-and-app-roots-do-not-reach-adapters`로 막는다. +- 기능 루트 파일(`feature-module.ts` 등)이나 계층이 아닌 폴더(`support/` 등)의 파일이 `src/adapters`에 닿으면 `feature-and-app-roots-do-not-reach-adapters`로 막는다. 기능 안에서 `src/adapters`에 닿을 수 있는 곳은 `adapters/` 폴더뿐이다. - operation ID·route ID·입력 타입을 틀리면 `check:types`가 막는다. 음성 fixture: `check:types:fixture:http-operation-id`, `check:types:fixture:http-route-id`, `check:types:fixture:http-operation-input`. - 호스트가 주지 않는 capability를 `needs`에 적으면 조립이 실패한다. - 메시지: `feature needs , which the host did not provide` diff --git a/docs/operations/ci-quality-gates.md b/docs/operations/ci-quality-gates.md index 511689b1..fb74d0f1 100644 --- a/docs/operations/ci-quality-gates.md +++ b/docs/operations/ci-quality-gates.md @@ -132,7 +132,9 @@ DOCUMENTATION_READY (off-chain) - 입구 문서가 실제 `src` 최상위 폴더와 `.dependency-cruiser.json` 규칙 이름을 적는지 - `docs/README.md` 1절의 현재 계약 문서에 적힌 repo 경로·링크·package script· - FE-GATE ID가 실제로 있는지 + FE-GATE ID가 실제로 있는지. 짝 백엔드 경로는 옆 checkout의 작업 트리가 아니라 + `config/contracts/backend-contract-pin.json`이 고정한 커밋에서 찾고, 그 커밋을 + 읽을 수 없으면 확인하지 못한 것으로 남긴다 - 2026-07-18 diagram 리뷰 기록의 두 사본(`docs/architecture/review-ledger.json`, `review-evidence.md`)이 같은 해시·점수를 담는지. 원본 diagram은 repo 밖에 있으므로 이 항목은 구조가 바뀌어도 통과한다 @@ -419,9 +421,14 @@ the paired backend: `{ "id": "PRODUCT-GATE-001", "name": "backend-contract", `FE-GATE-NNN` ids, their commands, artifacts and readiness formula stay the template's. Each runs as `corepack pnpm