feat(doc-store): #75 PR 1 — schema 재정의 (8 collections + assignment_id rename)#77
Merged
Conversation
… rename) #75 재설계의 첫 implementation PR. Doc Store MCP 의 collection 구조를 chat tier (sessions / chats / assignments) + A2A tier (a2a_contexts / a2a_messages / a2a_tasks / a2a_task_status_updates / a2a_task_artifacts) + 도메인 산출물 (issues / wiki_pages) 로 재정의. 기존 agent_tasks / agent_sessions / agent_items 폐기 (cut-over — 데이터 마이그레이션 path 없음). 핵심 변경: - migrations/004_redesign_chat_a2a.sql + rollback — 기존 3 테이블 drop + 새 8 테이블 create + issues/wiki_pages 의 agent_task_id → assignment_id 컬럼 rename + FK 재정의 - shared/dev_team_shared/doc_store/schemas/ — 새 8 Pydantic 모델 (Session / Chat / Assignment / A2AContext / A2AMessage / A2ATask / A2ATaskStatusUpdate / A2ATaskArtifact). 기존 AgentTask / AgentSession / AgentItem 파일 삭제. Issue / WikiPage 의 agent_task_id 필드 → assignment_id 로 rename. - shared/dev_team_shared/doc_store/tool_names.py — 새 10 Tools enum, 기존 3 제거 - shared/dev_team_shared/doc_store/client.py — 새 collection 별 typed 메서드 추가, 기존 agent_* 메서드 제거. Issue/WikiPage 메서드는 그대로 (필드명만 rename). - mcp/doc-store/src/doc_store_mcp/repositories/ — 새 8 repository 추가, 기존 3 삭제. issue / wiki_page 의 SQL 에서 agent_task_id → assignment_id. - mcp/doc-store/src/doc_store_mcp/tools/ — 새 8 MCP tool 묶음 추가, 기존 3 삭제. mcp_instance.py 의 AppContext + lifespan 갱신. - mcp/doc-store/CLAUDE.md — 10 collection 구조 + 어휘 정렬 Downstream cleanup (각 모듈이 새 schemas / 어휘 위에서 동작): - shared/dev_team_shared/event_bus/events.py — agent_task_id 필드명은 PR 2 에서 chat / assignment / A2A 이벤트 layer 분리 시 함께 정리. 본 PR 에선 유지. - chronicler/src/chronicler/processors/{session_start, item_append, session_end}.py — PR 2 재작성 대기. 본 PR 에선 stub (no-op + warn-log). - agents/librarian/src/librarian_agent/tools.py — agent_* read 도구 → 새 collection (sessions / chats / assignments / a2a_*) 의 read 도구 21 개로 재정의. config/base.yaml persona / skill description 도 어휘 정렬. - agents/primary/src/primary_agent/tools/doc_store.py — agent_tasks_get/list 제거 (Assignment 발급은 chat protocol 도입 — PR 4 — 이후에 추가). 테스트 갱신: - mcp/doc-store/tests/test_schemas.py — 새 8 모델 단위 테스트 - mcp/doc-store/tests/test_repositories.py — 새 8 repository 통합 테스트 (TRUNCATE 대상 collection 도 갱신) - chronicler/tests/test_handler.py — stub processor 의 no-op 검증으로 단순화 - agents/librarian/tests/test_tools.py — 새 21 tool 매핑 검증 - agents/primary/tests/test_tools.py — agent_tasks_* 제거 + assignment_id rename 반영 검증: - shared 55, mcp/doc-store 24 (schemas 16 + repositories 8 통합), librarian 21, primary 23, chronicler 6 통과 - docker compose --profile agents up -d --build → 10 컨테이너 정상 부팅, migration 004 자동 적용 (8 새 테이블 created), Primary "doc_store=on, issue_tracker=on, wiki=on, librarian=on, total=21" 확인 이후 PR: - PR 2: shared/event_bus 새 이벤트 (3 layer) + Chronicler processor 재작성 - PR 3: shared/a2a chat handler + 자동 Task wrap fix + #72 큐 hook - PR 4: UG chat protocol routes + FE Chat.tsx 재작성 - PR 5: Primary chat handler 통합 + persona Refs #75 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#75 재설계의 첫 implementation PR. Doc Store MCP 의 collection 구조를 chat tier (sessions / chats / assignments) + A2A tier (a2a_contexts / a2a_messages / a2a_tasks / a2a_task_status_updates / a2a_task_artifacts) + 도메인 산출물 (issues / wiki_pages) 로 재정의. 기존
agent_tasks/agent_sessions/agent_items폐기 (cut-over).본 PR 은 schema / repositories / tools / typed client / migration 영역만. UG chat protocol / handler / Chronicler 본 처리 로직 / Primary 의 Assignment 발급 등은 후속 PR.
새 Schema (8 테이블)
sessions/chats(immutable) /assignmentsa2a_contexts/a2a_messages(immutable) /a2a_tasks/a2a_task_status_updates(immutable) /a2a_task_artifacts(immutable)issues/wiki_pages(FK 컬럼agent_task_id→assignment_idrename)자세한 schema 는 knowledge-model §4.2.
Migration (004_redesign_chat_a2a)
Downstream cleanup
shared/event_bus/events.pyagent_task_id필드명 / 어휘는 PR 2 에서 3 layer 이벤트 분리 시 함께 정리chronicler/processors/*agents/librarian/tools.pyagent_*read 도구 → 새 collection 의 read 도구 21 개로 재정의 (assignments / sessions / chats / a2a_*)agents/librarian/config/base.yamlagents/primary/tools/doc_store.pyagent_tasks_get/list제거 (Assignment 발급은 chat protocol 도입 — PR 4 — 이후)검증
단위 / 통합 테스트
실 환경 부팅
docker compose --profile agents up -d --build→ 10 컨테이너 정상 부팅\dt결과 8 새 테이블 + 2 도메인 = 10 collectionprimary tools wired: doc_store=on, issue_tracker=on, wiki=on, librarian=on, total=21librarian agent ready (..., tools=21)후속 PR (#75 implementation roadmap)
본 PR 머지 후 PR 2 진행.
기존 이슈 영향
Refs #75
🤖 Generated with Claude Code