feat(claude): 분야 전문가를 지식 스킬 아홉 개와 렌즈 리뷰어로 두고 협업 명단을 붙인다
frontend-quality-gates / merge / static checks (pull_request) Successful in 3m3s
frontend-quality-gates / merge / tests (pull_request) Failing after 13m34s
frontend-quality-gates / merge / browser tests (pull_request) Successful in 9m26s
frontend-quality-gates / FE-GATE-017 / diagram-review (pull_request) Skipped
frontend-quality-gates / main / checker self-tests (pull_request) Skipped
frontend-quality-gates / FE-GATE-014 / config-compatibility (pull_request) Skipped
frontend-quality-gates / FE-GATE-028 / manual-accessibility-review (pull_request) Skipped
frontend-quality-gates / FE-GATE-026 / lab-performance (pull_request) Skipped
frontend-quality-gates / FE-GATE-015 / immutable-release-candidate (pull_request) Skipped
frontend-quality-gates / external-vulnerability-provider (pull_request) Skipped
frontend-quality-gates / external-provenance-provider (pull_request) Skipped
frontend-quality-gates / promote-verified-immutable-candidate (pull_request) Skipped
frontend-quality-gates / deploy-promoted-release (pull_request) Skipped
frontend-quality-gates / FE-GATE-019 / hosting-header (pull_request) Skipped
frontend-quality-gates / FE-GATE-021 / runbook-boot-config (pull_request) Skipped
frontend-quality-gates / FE-GATE-022 / runbook-chunk-mismatch (pull_request) Skipped
frontend-quality-gates / FE-GATE-023 / runbook-api-degradation (pull_request) Skipped
frontend-quality-gates / FE-GATE-024 / runbook-telemetry (pull_request) Skipped
frontend-quality-gates / FE-GATE-025 / runbook-release-rollback (pull_request) Skipped
frontend-quality-gates / FE-GATE-018 / field-web-vitals (pull_request) Skipped
frontend-quality-gates / merge / static checks (pull_request) Successful in 3m3s
frontend-quality-gates / merge / tests (pull_request) Failing after 13m34s
frontend-quality-gates / merge / browser tests (pull_request) Successful in 9m26s
frontend-quality-gates / FE-GATE-017 / diagram-review (pull_request) Skipped
frontend-quality-gates / main / checker self-tests (pull_request) Skipped
frontend-quality-gates / FE-GATE-014 / config-compatibility (pull_request) Skipped
frontend-quality-gates / FE-GATE-028 / manual-accessibility-review (pull_request) Skipped
frontend-quality-gates / FE-GATE-026 / lab-performance (pull_request) Skipped
frontend-quality-gates / FE-GATE-015 / immutable-release-candidate (pull_request) Skipped
frontend-quality-gates / external-vulnerability-provider (pull_request) Skipped
frontend-quality-gates / external-provenance-provider (pull_request) Skipped
frontend-quality-gates / promote-verified-immutable-candidate (pull_request) Skipped
frontend-quality-gates / deploy-promoted-release (pull_request) Skipped
frontend-quality-gates / FE-GATE-019 / hosting-header (pull_request) Skipped
frontend-quality-gates / FE-GATE-021 / runbook-boot-config (pull_request) Skipped
frontend-quality-gates / FE-GATE-022 / runbook-chunk-mismatch (pull_request) Skipped
frontend-quality-gates / FE-GATE-023 / runbook-api-degradation (pull_request) Skipped
frontend-quality-gates / FE-GATE-024 / runbook-telemetry (pull_request) Skipped
frontend-quality-gates / FE-GATE-025 / runbook-release-rollback (pull_request) Skipped
frontend-quality-gates / FE-GATE-018 / field-web-vitals (pull_request) Skipped
문제: 하네스에 분야 지식이 없다. QA·디자인/UX·디자인 시스템·React·폴더 구조·시험 환경·접근성·성능·보안의 이 repo 규칙(배럴 경계, 토큰 밖 색 금지, axe 태그 범위, 예산, FE-GATE 실행법 등)은 문서와 검사기에 흩어져 있고, 여러 분야에 걸친 일을 누가 보고 어떻게 합치는지 정한 곳이 없다. 고른 방법(소유자 결정 2026-11-11 「W3 설계대로」, 백엔드와 같은 모양): - 지식 스킬 fe-* 9개(.claude/skills/). paths를 걸어 그 분야 파일을 만질 때만 목록에 뜬다. 본문은 언제 쓰나 → 함정 → 실패는 이렇게 보인다 → 검증 → 이 repo에서 정한 것 순서. 초안은 이 repo 문서만 본 서브에이전트가 썼고 glob 75개가 모두 파일에 걸리는 것을 확인했다. - 서브에이전트 reviewer(렌즈 = brief의 스킬 경로). arch-reviewer는 fe-structure를, verify-app은 fe-qa를 미리 싣는다(QA 탐색 차터). - .claude/rules/expert-skills.md: 분야 파일을 고치기 전에 그 스킬의 「함정」·「검증」을 보게 하는 두 줄. - docs/work/experts.md: 명단·경로 → 렌즈·넘김 지도(백엔드 repo로 가는 API 계약 차이는 총괄을 거침)·충돌·비용. 루트 AGENTS.md·CLAUDE.md 한 줄씩, README 3절 4단계와 delegate.md 4.3절에 가리키는 말. - 시험: 에이전트 넷, Agent 도구 금지, 설명 합 1,200자, 미리 싣는 스킬, 지식 스킬의 paths·설명 300자·금지어·절 순서·150줄·glob이 파일에 걸림, 명단이 모든 전문가를 담음, 규칙 목록에 expert-skills. - 문서 PR #15와 겹치지 않게 docs/는 docs/work/만 건드렸다. 버린 대안: 분야마다 서브에이전트(QA·디자인·접근성 …). Anthropic 2026-10-22·2026-01-23·2026-04-07 글이 반대하고, 설명이 모든 세션에 든다. 위험: 플러그인 lead·new-expert·harness-eval은 claude-harness PR #3(0.3.0)이 병합돼야 받는다. fe-ux·fe-a11y의 paths는 템플릿에 기능 화면이 없어 src/presentation/**까지만 건다(기능이 생기면 넓힌다). 검증: scripts/verify.sh docs → rc=0, scripts/verify.sh hooks → 68건 통과. 새 시험은 조건을 깰 때마다 실패했다. desktop merge 단계는 이 커밋 뒤에 돈다.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
"""루트 지침과 `.claude/`의 규칙·스킬·서브에이전트가 소유자 결정(2026-11-07)대로인지 본다.
|
||||
"""루트 지침과 `.claude/`의 규칙·스킬·서브에이전트가 소유자 결정(2026-11-07, 2026-11-11)대로인지 본다.
|
||||
|
||||
결과만 받는 일은 서브에이전트, 파일을 바꾸는 위임은 하위 세션이다(docs/work/delegate.md 4.3절).
|
||||
새 스킬은 모두 모델이 부를 수 있고, 설명에 발동 조건을 문단으로 적는다.
|
||||
새 스킬은 모두 모델이 부를 수 있고, 설명에 발동 조건을 적는다.
|
||||
분야 전문가는 `paths`를 건 지식 스킬(`fe-*`)이고, 분야 판정은 서브에이전트 `reviewer` 하나에 렌즈로 준다
|
||||
(docs/work/experts.md). 서브에이전트 설명은 모든 세션의 컨텍스트에 들어가니 합에 상한을 둔다.
|
||||
|
||||
python3 -m unittest discover -s scripts/tests
|
||||
"""
|
||||
@@ -18,6 +20,13 @@ CLAUDE = REPO / ".claude"
|
||||
# Claude Code cuts a skill description at this many characters in the listing.
|
||||
DESCRIPTION_LIMIT = 1536
|
||||
WRITE_TOOLS = {"Edit", "Write", "MultiEdit", "NotebookEdit"}
|
||||
# Every session (and every subagent) carries the subagent descriptions; there is no listing budget for them.
|
||||
AGENT_DESCRIPTIONS_LIMIT = 1200
|
||||
KNOWLEDGE_DESCRIPTION_LIMIT = 300
|
||||
KNOWLEDGE_BODY_LIMIT = 150
|
||||
KNOWLEDGE_SECTIONS = ["언제 쓰나 · 넘기는 곳", "함정", "이 분야에서 실패는 이렇게 보인다", "검증", "이 repo에서 정한 것"]
|
||||
# Emphasis makes models over-trigger; a pasted example turn gets copied instead of the body being read.
|
||||
BANNED_IN_DESCRIPTION = ("PROACTIVELY", "MUST", "CRITICAL", "IMPORTANT", "<example>")
|
||||
|
||||
|
||||
def front_matter(path: Path) -> tuple[dict[str, str], list[str]]:
|
||||
@@ -89,7 +98,8 @@ class SubagentTest(unittest.TestCase):
|
||||
|
||||
def test_each_definition_names_itself_and_says_when_to_use_it(self) -> None:
|
||||
definitions = sorted(self.AGENTS.glob("*.md"))
|
||||
self.assertEqual([path.stem for path in definitions], ["arch-reviewer", "code-simplifier", "verify-app"])
|
||||
self.assertEqual([path.stem for path in definitions],
|
||||
["arch-reviewer", "code-simplifier", "reviewer", "verify-app"])
|
||||
for path in definitions:
|
||||
fields, _ = front_matter(path)
|
||||
self.assertEqual(fields.get("name"), path.stem, path)
|
||||
@@ -107,6 +117,22 @@ class SubagentTest(unittest.TestCase):
|
||||
self.assertIn("파일을 쓰거나 고치지 않는다", reviewer)
|
||||
self.assertIn("pnpm·node·게이트는 돌리지 않는다", reviewer)
|
||||
|
||||
def test_no_subagent_can_start_another_subagent(self) -> None:
|
||||
# Only the lead starts a wave; a reviewer that spawns reviewers multiplies tokens and hides who saw what.
|
||||
for path in self.AGENTS.glob("*.md"):
|
||||
tools = {tool.strip() for tool in front_matter(path)[0].get("tools", "").split(",")}
|
||||
self.assertNotIn("Agent", tools, path)
|
||||
|
||||
def test_subagent_descriptions_stay_within_the_budget(self) -> None:
|
||||
total = sum(len(front_matter(path)[0].get("description", "")) for path in self.AGENTS.glob("*.md"))
|
||||
self.assertLessEqual(total, AGENT_DESCRIPTIONS_LIMIT, "every session carries these; shorten one")
|
||||
|
||||
def test_the_reviewer_takes_its_lens_from_the_brief_and_the_others_preload_their_skill(self) -> None:
|
||||
self.assertNotIn("skills", front_matter(self.AGENTS / "reviewer.md")[0], "the lens changes per brief")
|
||||
self.assertIn("렌즈", (self.AGENTS / "reviewer.md").read_text(encoding="utf-8"))
|
||||
self.assertEqual(front_matter(self.AGENTS / "arch-reviewer.md")[0].get("skills"), "[fe-structure]")
|
||||
self.assertEqual(front_matter(self.AGENTS / "verify-app.md")[0].get("skills"), "[fe-qa]")
|
||||
|
||||
def test_verify_app_runs_on_the_desktop_under_the_shared_lock(self) -> None:
|
||||
text = (self.AGENTS / "verify-app.md").read_text(encoding="utf-8")
|
||||
for fragment in ("docs/work/operate.md", "scripts/verify.sh", "flock /tmp/claude-gates/heavy.lock",
|
||||
@@ -117,8 +143,37 @@ class SubagentTest(unittest.TestCase):
|
||||
class SkillTest(unittest.TestCase):
|
||||
CANON = {"new-feature": "docs/work/new-feature.md", "desktop-gates": "docs/work/operate.md"}
|
||||
|
||||
def test_the_repository_skills_are_the_two_the_manual_names(self) -> None:
|
||||
self.assertEqual(sorted(path.parent.name for path in (CLAUDE / "skills").glob("*/SKILL.md")), sorted(self.CANON))
|
||||
KNOWLEDGE = ["fe-a11y", "fe-design-system", "fe-performance", "fe-qa", "fe-react", "fe-security", "fe-structure",
|
||||
"fe-testing", "fe-ux"]
|
||||
|
||||
def test_the_repository_skills_are_the_two_playbook_skills_and_the_knowledge_skills(self) -> None:
|
||||
self.assertEqual(sorted(path.parent.name for path in (CLAUDE / "skills").glob("*/SKILL.md")),
|
||||
sorted(list(self.CANON) + self.KNOWLEDGE))
|
||||
|
||||
def test_each_knowledge_skill_is_path_scoped_short_and_puts_gotchas_first(self) -> None:
|
||||
for name in self.KNOWLEDGE:
|
||||
path = CLAUDE / "skills" / name / "SKILL.md"
|
||||
fields, patterns = front_matter(path)
|
||||
self.assertEqual(fields.get("name"), name)
|
||||
self.assertNotIn("disable-model-invocation", fields)
|
||||
description = fields.get("description", "")
|
||||
self.assertLessEqual(len(description), KNOWLEDGE_DESCRIPTION_LIMIT, name)
|
||||
for banned in BANNED_IN_DESCRIPTION:
|
||||
self.assertNotIn(banned, description, name)
|
||||
self.assertIn("paths", fields, f"{name}: paths keeps it out of the listing until its files are touched")
|
||||
self.assertTrue(patterns, name)
|
||||
text = path.read_text(encoding="utf-8")
|
||||
self.assertEqual([line[3:].strip() for line in text.splitlines() if line.startswith("## ")],
|
||||
KNOWLEDGE_SECTIONS, name)
|
||||
self.assertLessEqual(len(text.splitlines()), KNOWLEDGE_BODY_LIMIT, name)
|
||||
for pattern in patterns:
|
||||
# A relayout that moves folders leaves a glob matching nothing, and the skill never shows up.
|
||||
self.assertTrue(next(REPO.glob(pattern), None), f"{name}: '{pattern}' matches no file")
|
||||
|
||||
def test_the_experts_manual_names_every_expert(self) -> None:
|
||||
manual = (REPO / "docs/work/experts.md").read_text(encoding="utf-8")
|
||||
for name in self.KNOWLEDGE + [path.stem for path in (CLAUDE / "agents").glob("*.md")]:
|
||||
self.assertIn(name, manual)
|
||||
|
||||
def test_each_skill_is_model_invoked_and_says_when_in_its_description(self) -> None:
|
||||
for name in self.CANON:
|
||||
@@ -140,7 +195,8 @@ class SkillTest(unittest.TestCase):
|
||||
class PathRuleTest(unittest.TestCase):
|
||||
def test_every_rule_is_scoped_by_paths_that_exist(self) -> None:
|
||||
rules = sorted((CLAUDE / "rules").glob("*.md"))
|
||||
self.assertEqual([path.stem for path in rules], ["adapters", "docs", "features", "gates-and-budgets", "tests"])
|
||||
self.assertEqual([path.stem for path in rules],
|
||||
["adapters", "docs", "expert-skills", "features", "gates-and-budgets", "tests"])
|
||||
for path in rules:
|
||||
fields, patterns = front_matter(path)
|
||||
self.assertIn("paths", fields, path)
|
||||
|
||||
Reference in New Issue
Block a user