경계 위반, 늘어난 skip·only, 작업 매뉴얼 규칙 위반은 desktop 게이트에서야 드러났고, desktop 검증 없이 턴을 끝내도 아무것도 알리지 않았다. scripts/hooks/hooks.py(백엔드 hooks.py와 같은 모양, 표준 라이브러리와 git만)를 .claude/settings.json에 단다. - N3: src TypeScript를 고치면 import를 .dependency-cruiser.json의 forbidden 규칙(path·pathNot·$1)에 그대로 대 본다. 규칙 파일을 읽으므로 규칙이 바뀌면 따라간다. - N6: 테스트에 .skip·.only·.fixme·.todo가 마지막 커밋보다 늘거나, 예산· 기준선·ungated 목록·스냅숏을 고치면 알린다. - N2: .md를 고치면 scripts/check-work-docs.py의 실패 줄을 알린다. - N5: desktop만 확인할 수 있는 파일을 고친 뒤 desktop 실행이 없으면 턴 끝을 한 번 막고 이유를 준다. 모두 넛지다. repo 안 편집에 되돌릴 수 없는 것이 없어 차단 훅은 없다. 고른 방법: 노트북에서는 정적 검사만 하고 포맷·린트·타입은 desktop scripts/verify.sh에 둔다(brief, 2026-11-08). 설계 13절 Q6은 편집 훅에서 한 파일 eslint를 골랐지만, 프론트 eslint는 pnpm·node_modules가 필요해 "pnpm은 desktop에서만" 규칙과 부딪친다. 위험·한계: N3는 정규식으로 import를 뽑아 주석 속 따옴표 같은 드문 모양을 놓칠 수 있다. 정본은 check:architecture다. 훅 시험은 아직 CI workflow가 부르지 않는다. 훅은 세션 시작에 읽혀 이 세션에서는 돌지 않았다. 검증: python3 -m unittest scripts/tests/test_hooks.py 26건 통과. 실제 규칙과 src 377개 파일에서 N3 알림 0(거짓 양성 시험). 조건 하나씩 끈 변이 10개를 모두 시험이 잡았다. Refs: design-docs harness/01-harness-design.md 5.2·5.3절
53 lines
1.3 KiB
JSON
53 lines
1.3 KiB
JSON
{
|
|
"permissions": {
|
|
"deny": [
|
|
"Read(**/.env)",
|
|
"Read(**/.env.local)",
|
|
"Read(**/.env.*.local)",
|
|
"Read(**/.env.development)",
|
|
"Read(**/.env.staging)",
|
|
"Read(**/.env.production)",
|
|
"Edit(**/.env)",
|
|
"Edit(**/.env.local)",
|
|
"Edit(**/.env.*.local)",
|
|
"Edit(**/.env.development)",
|
|
"Edit(**/.env.staging)",
|
|
"Edit(**/.env.production)"
|
|
]
|
|
},
|
|
"hooks": {
|
|
"PostToolUse": [
|
|
{
|
|
"matcher": "Edit|Write|MultiEdit",
|
|
"hooks": [
|
|
{"type": "command", "command": "python3 \"$CLAUDE_PROJECT_DIR\"/scripts/hooks/hooks.py post-edit", "timeout": 30}
|
|
]
|
|
},
|
|
{
|
|
"matcher": "Bash",
|
|
"hooks": [
|
|
{"type": "command", "command": "python3 \"$CLAUDE_PROJECT_DIR\"/scripts/hooks/hooks.py post-bash", "timeout": 10}
|
|
]
|
|
}
|
|
],
|
|
"Stop": [
|
|
{
|
|
"hooks": [
|
|
{"type": "command", "command": "python3 \"$CLAUDE_PROJECT_DIR\"/scripts/hooks/hooks.py stop", "timeout": 10}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"extraKnownMarketplaces": {
|
|
"claude-harness": {
|
|
"source": {
|
|
"source": "git",
|
|
"url": "https://git.learn.hyeonworks.com/donghyeon.kang/claude-harness.git"
|
|
}
|
|
}
|
|
},
|
|
"enabledPlugins": {
|
|
"harness@claude-harness": true
|
|
}
|
|
}
|