Skip to content

feat(v1): V1 walking skeleton — core/harness/4기둥/tools/Discord/영속화#228

Merged
seyoung4503 merged 4 commits into
masterfrom
feat/v1-discord-agent
May 30, 2026
Merged

feat(v1): V1 walking skeleton — core/harness/4기둥/tools/Discord/영속화#228
seyoung4503 merged 4 commits into
masterfrom
feat/v1-discord-agent

Conversation

@seyoung4503
Copy link
Copy Markdown
Collaborator

무엇

`docs/discord-redesign`의 v4.1 설계대로 V1을 백지에서 재작성. 구버전 components/flows 파이프라인을 걷어내고 ports&adapters 구조로 골격 수립 + 4기둥 구현 + Discord 프론트엔드 + 영속화까지.

설계만 있고 코드가 없으면 검증이 안 됨. v4.1 §4.1 V1 스코프(★① safety / ★② memory / ★③ ingestion / ★④ federation + Discord + persistence)를 실제로 도는 형태로.

포함

Week 1 — core + harness walking skeleton

  • `core/`: `types`, `identity` (federation scope chain narrow→wide), 포트 11종 (llm/explorer/tool/secrets/audit/session_store/frontend/safety/memory/ingestion/semantic_scope)
  • `harness/`: HarnessContext, Session, ToolRegistry, system_prompt, agent_loop
  • `frontends/cli/app.py` + FakeLLM + Ping 도구로 end-to-end 검증

Week 2 — 4기둥 + tools + concierge

  • `semantic/`: SemanticEntry/Layer/scoped merge + scope_resolver (★④ git-like 3-scope)
  • `safety/`: SafetyPipeline + Whitelist/Timeout 레이어 + 회귀 12종 (★①)
  • `memory/`: 3축 분리 (Store/Recall/Extractor) + MemoryService (★②)
  • `ingestion/`: FileSource × LLMExtractor × pipeline (★③)
  • `adapters/`: OpenAI(urllib) · PG explorer stub · SQLite store(real)
  • `tenancy/`: ContextConcierge 조립점 + EncryptedSecrets(Fernet)
  • `tools/` 6종: run_sql(safety gate→execute) · explore_schema · define_metric · remember · ask_user · ingest_doc

Week 4–5 — Discord + persistence + 데모

  • `frontends/discord/`: session_router · render(>50행 CSV) · commands(6 슬래시 핸들러, discord.py 비의존 순수층) · bot.py
  • `adapters/storage/sqlite_semantic.py`: 시멘틱 정의 SQLite 영속화 (재시작 생존)
  • `tenancy/encrypted_secrets.py`: cryptography.Fernet 실암호화
  • `bench/ecommerce_demo.py`: federation(★④) + safety(★①) 라이브 데모
  • README v4.1 재작성, docs/DEPLOY.md, .env.example
  • Lean pyproject, 구버전 잔재(cli/interface/utils/infra/prompt/test) 정리

검증

  • 84개 자동화 테스트 통과 (safety 회귀 12 포함)
  • 77 모듈 import 0실패
  • bench/ecommerce_demo.py 실행 clean (federation 분기 + 게이트 차단 동작)
  • Discord 봇 토큰 없이 import OK
  • 라이브 검증: 실제 Discord 테스트 서버에서 봇 띄워서 7개 슬래시 명령 + @멘션 → agent_loop → 응답까지 동작 확인

어떻게 만들었나

AI 에이전트 팀 (semantic / safety / memory / ingestion / adapters / Discord / 영속화 / 데모·문서 담당) 병렬 구현. 핵심 계약(core ports)을 사람이 먼저 깔고 → 디렉토리 경계로 작업 분배 → 파일 충돌 0.

후속 PR

  • `feat/db-explorer-adapters` — D1/SQLAlchemy 실 어댑터
  • `feat/setup-wizard` — 비개발자용 `/setup` Modal/Select 위저드

🤖 Generated with Claude Code

seyoung4503 and others added 3 commits May 22, 2026 22:42
v4.1 백지 재작성 1단계. 구버전 components/flows 패키지를 걷어내고
v4.1 §2.2 디렉토리 구조로 골격 수립.

- core/: types, identity(scope chain), 11개 포트(llm/explorer/tool/
  secrets/audit/session_store/frontend/safety/memory/ingestion/
  semantic_scope) — 4기둥 + 멀티 인터페이스 추상 계약
- harness/: HarnessContext, Session, ToolRegistry, system_prompt,
  agent_loop(LLM→tool→다음턴 사이클)
- adapters/llm/fake.py + tools/ping.py + frontends/cli/app.py 로
  end-to-end 루프 검증
- tests/: 루프/transcript/scope chain 스모크 4종

검증: 45개 모듈 import 0 실패, agent_loop full tool cycle 완주,
스모크 4종 PASS.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
agent-teams 병렬 구현(semantic/safety/memory/ingestion/adapters/tenancy)
+ lead 통합(tools). 전 모듈 stdlib only.

- semantic/: SemanticEntry/Layer/scoped merge(federation)/store/composer
  + tenancy/scope_resolver (★④ git-like 3-scope resolution)
- safety/: SafetyPipeline + Whitelist/Timeout layers + 회귀 12종 (★①)
- memory/: in-memory store · inject-all recall · manual extractor · service (★②)
- ingestion/: FileSource × LLMExtractor × pipeline (★③)
- adapters/: OpenAI(urllib, stdlib) · PG explorer stub(+execute) · SQLite store(real)
- tenancy/: ContextConcierge 조립점 + EncryptedSecrets
- tools/: run_sql(safety gate→execute) · explore_schema · define_metric(scope)
  · remember · ask_user · ingest_doc + build_default_tools 팩토리
- core: ExplorerPort.execute 추가
- CLI를 concierge 풀스택으로 업그레이드, 구버전 dead 테스트 정리

검증: 72 모듈 import 0실패, 57 테스트 0실패(safety 회귀 12 포함),
concierge+agent_loop end-to-end 동작.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
agent-teams 병렬 마무리. V1 기능 완성(라이브 토큰/실DB 제외).

- frontends/discord/: session_router · render(>50행 CSV) · commands(6 슬래시
  핸들러, discord.py 비의존 순수층) · bot.py(discord.py transport, 토큰
  없이 import 가능). query()가 세션 영속화까지 닫음.
- adapters/storage/sqlite_semantic.py: 시멘틱 정의 SQLite 영속화(재시작 생존)
- tenancy/encrypted_secrets.py: XOR stub → cryptography.Fernet 실암호화
- tenancy/concierge.py: 영속 store + 암호화 secrets 배선(무인자 호환 유지)
- bench/ecommerce_demo.py: federation(★④) + safety(★①) 라이브 데모
- README v4.1 재작성, docs/DEPLOY.md, .env.example, .github/workflows/ci.yml
  (pytest + 회귀 12종 게이트)
- lean pyproject(discord.py·cryptography 의존성, 새 엔트리포인트), 구버전
  최상위 잔재(cli/interface/utils/infra/prompt/test) 정리

검증: 84 테스트 통과, 77 모듈 import 0실패, bench 데모 clean,
bot 토큰 없이 import OK.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@seyoung4503 seyoung4503 changed the base branch from docs/discord-redesign to master May 30, 2026 03:16
@seyoung4503 seyoung4503 merged commit 25c1162 into master May 30, 2026
@seyoung4503 seyoung4503 deleted the feat/v1-discord-agent branch May 30, 2026 03:20
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