Skip to content

refactor: rename semantic layers (guild→org, channel→team, member→user)#248

Open
thrcle wants to merge 4 commits into
CausalInferenceLab:masterfrom
thrcle:feat/layer-rename
Open

refactor: rename semantic layers (guild→org, channel→team, member→user)#248
thrcle wants to merge 4 commits into
CausalInferenceLab:masterfrom
thrcle:feat/layer-rename

Conversation

@thrcle

@thrcle thrcle commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

변경 내용

Discord 내부 용어인 guild/channel/member가 비즈니스 시맨틱 레이어에 그대로 노출되고 있어, 플랫폼 중립적인 이름으로 교체했습니다.

변경 전 변경 후 의미
guild org 조직(전사) 공통 범위
channel team 채널/팀 단위 범위
member user 개인 오버라이드

term_custom 기본 저장 레이어 변경

layer를 명시하지 않으면 user 대신 team에 저장되도록 기본값 변경.
bottom-to-top 용어 관리 흐름에 맞게: 팀 단위로 쌓인 후 org로 승격.
user 레이어는 팀 정의와 다르게 쓸 때만 명시적으로 layer:user 지정.

수정 파일

  • semantic_federation.py_LAYERS, _validate_layer, _resolve_entry, tool spec enum, KV 키 로직, 기본 레이어값
  • confirm_ingest.py, org_setup.py — layer 문자열 리터럴
  • Discord 프론트엔드 — 커맨드 기본값, 도움말 텍스트, term wizard 선택지
  • 테스트 전체 업데이트 (159개 통과)

PR #247 리뷰어 피드백 반영 (이 PR에 포함)

  • docs/USAGE.md/ingest ref:파일명 줄 제거, /setup 관리자 전용 표기 제거, 커맨드 표에 /help 추가
  • commands.py(관리자) 표기 제거, "채널에서" → "멘션하거나 스레드에서"

기존 배포 환경

KV 키 포맷이 변경되므로 배포 후 마이그레이션 스크립트 1회 실행 필요. (PR 코멘트에 첨부)

테스트 체크리스트

  • 테스트 159개 전부 통과 (uv run pytest -q)
  • /term_custom 기본값 team 저장 확인
  • /term_custom layer:org 관리자 권한 체크 정상 동작

🤖 Generated with Claude Code

thrcle and others added 4 commits July 19, 2026 17:04
Discord-specific 'guild/channel/member' terminology leaked into the
business semantic layer, making the API confusing for non-Discord
contexts. Replace with domain-neutral names:
  guild  → org   (organisation-wide scope)
  channel → team  (channel/team scope)
  member → user  (personal override scope)

KV key format, FedEntry.layer values, tool parameter enums, Discord
command defaults, and all tests updated. Existing stored entries can
be migrated with the one-off script in the PR description.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- docs/USAGE.md: remove /ingest ref:파일명 row (path traversal risk),
  remove false admin-only claim on /setup, add /help to command table,
  fix layer names in FAQ to match new org/team/user naming
- commands.py: remove '(관리자)' label from DB connection section,
  fix '채널에서' → '멘션하거나 스레드에서' to match actual bot behaviour,
  update layer example in help text to new names

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
명시적으로 layer를 지정하지 않으면 팀 단위에 저장되도록 기본값 변경.
bottom-to-top 용어 관리 흐름과 일치: 팀 단위로 쌓인 후 org로 승격.
user 레이어는 팀 정의와 다르게 쓸 때만 명시적으로 선택.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant