Imported from hsskey/authority-diff (
AGENTS.md). Install upstream withnpx skills add hsskey/authority-diff. Copyright stays with the author.
Authority Diff
Agent 권한 정책 변경의 근거를 과거 작업 기록으로 만드는 modular monolith.
현재 범위는 V1(docs/cutline.md)이고 docs/design.md는 Target Architecture다.
docs/cutline.md가docs/design.md와 다르면 cutline을 따른다. cutline 13장의 code는 작성하지 않는다.- 용어는
CONTEXT.md의 단어만 쓴다. 파일, symbol, table 이름도 같은 단어를 쓴다. - 구조, 이름, 계약을 정해야 할 때:
docs/design.md19~28장과docs/cutline.md6, 15장을 읽는다. - package를 추가하거나 다른 package를 import하기 전:
docs/design.md21장과 경계 규칙(.dependency-cruiser.cjs)을 읽는다. - 소유 경로 밖을 고치거나 새 의존성, 새 구조가 필요할 때:
docs/design.md33.3 절차로docs/acr/에 ACR을 쓴다. - 되돌리기 어려운 결정을 내리거나 바꾸기 전:
docs/adr/를 읽고, ADR 3조건(되돌리기 어려움, 맥락 없이는 의아함, 실제 대안이 있었음)을 채우면docs/adr/NNNN-<slug>.md를 추가한다. - test는 package entry point에서만 작성한다. 예상 가능한 실패는
Result로 반환한다. - 실제 transcript, 명령 원문, 경로, 저장소와 host 이름은 repo에 넣지 않는다. 실제 data에서 나온 산출물은
.local/에 두고 repo에는 집계 수치만 넣는다. fixture는 구조만 실제와 같고 내용은 합성이다. docs/evidence/의 측정 문서는 첫 줄에 corpus snapshot, classifierVersion, resultHash를 적는다. 한 문서에 서로 다른 classifier version의 수치를 섞지 않고, 이전 version 수치는 "Previous version" 절에만 남긴다. 다른 문서와 공유하는 수치는 stamp 다음<!-- evidence-numbers -->block에 적고,pnpm check:evidence(scripts/check-evidence.ts)가 문서 간 불일치와 version 혼용을 검사한다. fresh volume 재실행 절차는docs/evidence/adoption-preview.md에 있다.- 작업을 끝내기 전
pnpm check와pnpm lint:boundaries:prove를 실행한다.apps/web를 바꾸면pnpm test:e2e(Playwright,pnpm exec playwright install chromium필요)도 실행한다. 화면 스크린샷은pnpm e2e:visual이며test:e2e와 분리된 CIe2e-visualjob이 Playwright Docker image 안에서 baseline과 비교한다. 화면이 바뀌면 같은 image(playwright.config.ts, linux/amd64)에서--update-snapshots로 baseline을 다시 찍는다. Node는 22를 쓴다. apps/webstyles: JSX에는 Tailwind v4 utility만 쓴다. CSS는apps/web/src/styles/app.css하나(pnpm lint:css)이고@import "tailwindcss"(Preflight 포함),@theme,@layer base만 허용하고 unused class selector는 0이어야 한다.@apply와 새 CSS class는 쓰지 않는다. 같은 utility 조합이 세 번 반복되면 React component로 추출한다. 색은@themetoken만 쓰고(bg-surface,text-muted) arbitrary color는 금지한다. 화면이 바뀌는 PR에는 screenshot diff가 필요하다.- commit message, PR, 문서, 주석에 내부 진행 라벨(작업 단계 번호 등)이나 개인 맥락을 쓰지 않고 목적 기준으로 쓴다. 공개 저장소에 올라가는 내용은 오픈소스로 가정한다.
- branch는
<type>/<purpose>형식이고 type은feat|feature|fix|bugfix|hotfix|release|chore중 하나다.ai/,claude/,codex/,copilot/,cursor/,fm/같은 작성 주체 prefix와 내부 진행 라벨은 쓰지 않는다.
Maintaining this file
Keep this file for knowledge useful to almost every future agent session in this project. Do not repeat what the codebase already shows; point to the authoritative file or command instead. Prefer rewriting or pruning existing entries over appending new ones. When updating this file, preserve this bar for all agents and keep entries concise.
