- Code\rebar_pipeline, review_pipeline, pier-program을 정션에서 실제 폴더로 전환 - Code\rhino_mcp 및 CLAUDE_rhino배경.md 추가, .mcp.json은 PYTHONPATH로 새 위치 사용 - pier-program 내부 .git 제거(이력은 backup\pier-program_20261028.bundle에 보관) - worktree 가이드 반영(CLAUDE.local.md, HANDOFF.md) - D:\Rhino-MCP 경로 참조를 새 위치로 치환 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
66 lines
2.4 KiB
Python
66 lines
2.4 KiB
Python
import re
|
|
import sys
|
|
import json
|
|
|
|
SUPPORTED_LANGUAGES = ['en', 'ko', 'ja', 'zh', 'es', 'fr', 'de', 'it']
|
|
|
|
AGENT_TRIGGER_PATTERNS = {
|
|
'gap-detector': {
|
|
'en': ['verify', 'check', 'gap', 'compare', 'validate'],
|
|
'ko': ['검증', '확인', '갭', '비교', '검사', '맞아?', '이거 괜찮아?'],
|
|
},
|
|
'pdca-iterator': {
|
|
'en': ['improve', 'iterate', 'fix', 'auto-fix', 'optimize'],
|
|
'ko': ['개선', '반복', '수정', '자동 수정', '고쳐줘', '개선해줘'],
|
|
},
|
|
'cto-lead': {
|
|
'en': ['team', 'project lead', 'CTO', 'team mode', 'coordinate team'],
|
|
'ko': ['팀', '팀장', '프로젝트 리드', 'CTO', '팀 구성', '팀 모드'],
|
|
},
|
|
'bkend-expert': {
|
|
'en': ['bkend', 'BaaS', 'backend service', 'database setup', 'user auth', 'file upload', 'REST API', 'signup feature', 'login feature'],
|
|
'ko': ['bkend', '백엔드 서비스', '데이터베이스 설정', '사용자 인증', '파일 업로드', '회원가입 기능', '로그인 기능'],
|
|
},
|
|
'code-analyzer': {
|
|
'en': ['analyze', 'quality', 'security', 'code review', 'any issues?'],
|
|
'ko': ['분석', '품질', '보안', '코드 리뷰', '이상해', '뭔가 이상해'],
|
|
},
|
|
'starter-guide': {
|
|
'en': ['help', 'beginner', 'first time', 'how to', 'explain'],
|
|
'ko': ['도움', '초보자', '처음', '어떻게', '설명해', '모르겠'],
|
|
}
|
|
}
|
|
|
|
def detect_language(text):
|
|
if not text: return 'en'
|
|
if re.search(r'[\uAC00-\uD7AF]', text): return 'ko'
|
|
if re.search(r'[\u3040-\u30FF]', text): return 'ja'
|
|
return 'en'
|
|
|
|
def detect_intent(text):
|
|
lang = detect_language(text)
|
|
detected_agents = []
|
|
|
|
lower_text = text.lower()
|
|
|
|
for agent, patterns in AGENT_TRIGGER_PATTERNS.items():
|
|
# Check specific lang patterns
|
|
lang_patterns = patterns.get(lang, []) + patterns.get('en', [])
|
|
for pattern in lang_patterns:
|
|
if pattern.lower() in lower_text:
|
|
detected_agents.append(agent)
|
|
break
|
|
|
|
return {
|
|
"language": lang,
|
|
"suggested_agents": detected_agents
|
|
}
|
|
|
|
if __name__ == "__main__":
|
|
if len(sys.argv) < 2:
|
|
print(json.dumps({"error": "No text provided"}))
|
|
sys.exit(1)
|
|
|
|
result = detect_intent(sys.argv[1])
|
|
print(json.dumps(result, indent=2, ensure_ascii=False))
|