Merge branch 'main' into chore/layout-rules-r2-r5
frontend-quality-gates / merge / static checks (pull_request) Successful in 2m32s
frontend-quality-gates / merge / tests (pull_request) Failing after 14m8s
frontend-quality-gates / merge / browser tests (pull_request) Successful in 8m33s
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

main이 PR #17(분야 전문가 스킬)을 받아 39d00b28이 됐다. 충돌은 없고, #17이 바꾼 파일(.claude/, docs/work/, AGENTS.md, CLAUDE.md, scripts/tests/test_claude_setup.py)은 이 브랜치가 바꾼 파일과 겹치지 않는다.
This commit is contained in:
DongHyeonka
2026-11-12 07:33:49 +09:00
19 changed files with 1012 additions and 16 deletions
+62 -6
View File
@@ -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)