Skip to content

feat: 동일 용어 다중 레이어 정의를 프롬프트에 전체 주입#252

Open
thrcle wants to merge 5 commits into
CausalInferenceLab:masterfrom
thrcle:feat/multi-def-inject
Open

feat: 동일 용어 다중 레이어 정의를 프롬프트에 전체 주입#252
thrcle wants to merge 5 commits into
CausalInferenceLab:masterfrom
thrcle:feat/multi-def-inject

Conversation

@thrcle

@thrcle thrcle commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • 동일 용어에 여러 레이어(user/team/org) 정의가 있을 때 winner만 골라 주입하던 방식을 변경
  • 복수 정의가 있는 경우 전부 레이블 붙여 주입 — LLM이 채널 컨텍스트를 보고 적합한 정의를 선택하거나 사용자에게 선택을 요청할 수 있게 함
  • 단일 정의 용어는 기존 방식 유지

Changes

  • _tag_for_full(): 현재 채널 vs 다른 채널을 구분하는 레이블 반환 함수 추가
  • build_prompt_section(): 복수 정의 용어를 ★(현재 채널) + ·(기타) 형식으로 전체 노출

Test plan

  • pytest tests/test_semantic.py — 17 passed
  • pytest -q — 159 passed

🤖 Generated with Claude Code

thrcle and others added 5 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>
winner만 골라 주입하던 방식에서, 여러 레이어에 정의가 있는 경우
모두 레이블 붙여 주입하도록 변경. LLM이 채널 컨텍스트를 보고
적합한 정의를 선택하거나 사용자에게 선택을 요청할 수 있게 함.

- _tag_for_full(): 다른 채널 구분 레이블 반환 함수 추가
- build_prompt_section(): 단일 정의는 기존 방식, 복수 정의는
  ★(현재 채널) + ·(기타) 형식으로 전부 노출

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