Commit Graph

88 Commits

Author SHA1 Message Date
koriweb 7bec20620a refactor: v2.2.195-201 — slashRouter god-file 해체 (–95%) + 인프라 5개 추출
아키텍처 감사 결과 HIGH 2건 + MED 2건 + LOW 1건 — 7 라운드 정리 시리즈.
기능 변경 없음, 순수 구조 정리.

**slashRouter.ts: 4,174 → 201줄 (–3,973, –95%)**
**agent.ts: 1,617 → 1,551줄 (–66, –4%)**

v2.2.195: eventSourcedStore + SystemPromptBlock registry
  - createEventStore<E>(opts) — 4 store (customers/hire/runway/feedback) I/O 240줄 중복 제거
  - _turnCtx 5 named string field → 1 Map<string, string> (새 verification block 추가 25곳→1곳)
  - buildAstraModeSystemPrompt: 5 ternary gate + 5 위치 → 1 for-loop join

v2.2.196: trackers cluster split
  - src/features/teamops/handlers/_shared.ts (fmtKrw/parseAmount/daysUntil/parseTaskOwner/stageEmoji/STAGE_ORDER/TERMINAL_STAGES)
  - src/features/teamops/handlers/trackers.ts (runway/customers/hire)
  - src/features/teamops/handlers/index.ts (barrel)
  - extension.ts 에 side-effect import (순환 import 회피)

v2.2.197: mtimeFileCache + PostAnswerHook registry
  - src/lib/mtimeFileCache.ts — createMtimeFileCache<T>(name, parse) (terminologyBlock + termValidator 2-cache invariant 자동화)
  - src/agent/postAnswerHooks/{types,index}.ts — Devil/SelfCheck/TermValidator 3 _maybeX method → 1 runPostAnswerHooks(ctx) loop
  - agent.ts –66줄

v2.2.198: dashboards cluster split
  - src/features/teamops/handlers/dashboards.ts (morning/evening/cohort/weekly)

v2.2.199: coordination + communication clusters split
  - src/features/teamops/handlers/coordination.ts (task/decisions/onesie/blocked/standup)
  - src/features/teamops/handlers/communication.ts (draft/feedback)
  - callLmSynthesis export 노출 (communication 이 사용)
  - 옛 parseTaskOwner local 정의 삭제 (_shared.ts 사용)

v2.2.200: system cluster split
  - src/features/system/handlers.ts (memory/glossary/help)

v2.2.201: datacollect cluster split + LLM 인프라 추출
  - src/features/datacollect/handlers.ts (research/benchmark/youtube/blog/wikify/meet)
  - src/features/datacollect/llm.ts (callLmSynthesis + repairKoreanGlitches + bridgeErrorRemedy)
  - slashRouter import 4개로 축소: vscode/logInfo/getBridgeBaseUrl/bridgeErrorRemedy

**최종 slashRouter (201줄):**
- REGISTRY Map + registerSlashCommand/listSlashCommands/isSlashCommand
- handleSlashCommand (dispatcher + 에러 처리)
- Webview interface + chunk helper
- getRecentSlashCommands ring buffer (actionability scoring 용)

**미래 부담 감소 metrics:**
- 새 슬래시 명령: god-file 끝에 함수 + register → 1 파일 + 1 register call
- 새 verification block: 5곳 편집 → 1 set call
- 새 event store: 60줄 boilerplate → createEventStore 한 줄
- 새 post-answer hook: 3 step → 1 push
- 새 mtime cache: Map + invariant 관리 → createMtimeFileCache 한 줄

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 11:55:22 +09:00
koriweb 15a34e0889 feat: v2.2.194 — Post-gen Term Validator (결정론적 글로서리 검증)
v2.2.192 Terminology Dictionary 가 *instructional* 지시 (LLM 에게 표준 표기 사용 권유)
였다면, 이번엔 *deterministic* 검증 — LLM 이 지시를 안 따랐을 때 결정론적 정규식 스캔.

신규 모듈: src/agent/termValidator.ts
- parseGlossary() — .astra/glossary.md 정규식 파싱 (mtime 캐시)
  Pattern 1: **Canonical** (X: typo1, typo2, ...) — typo 등장 시 "→ Canonical 권장"
  Pattern 2: H2/H3 "금지/비추/forbidden/avoid/don't" 섹션의 -  "phrase"
- validateTermUsage() — 정규식 스캔 + 발견 횟수
- formatTermValidatorFooter() — markdown 한 줄 footer

False-positive 필터:
- 한글 1음절·영문 1자·공백 포함 토큰 제외
- 영문 단어 경계 매치, 한글 substring

Wiring:
- agent.ts _maybeRunTermValidator — Self-Check 직후, swallow 패턴
- /glossary reload — Term Validator 캐시도 함께 비움

신규 설정: g1nation.termValidatorEnabled (기본 true)

Footer 누적:
- v2.2.191 🔍 Self-check (LLM 호출, opt-in)
- v2.2.194 🔤 Term validator (정규식, on by default)

시너지: Terminology Dictionary(instructional, 작성 중) + Term Validator(deterministic,
작성 후) → 사용자가 .astra/glossary.md 한 곳만 관리하면 2단 자동 동작.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 16:38:56 +09:00
koriweb 990ea0ae5f feat: v2.2.173-193 — 4인 팀 운영 슬래시 13개 + ASTRA 검증 엔진 6종
4인 팀 운영 슬래시 (v2.2.173~189):
- 일과 리듬: /morning, /evening, /weekly, /standup
- 트래커 (event-sourced .astra/*.jsonl): /runway, /customers, /hire
- 작업·결정: /task, /blocked, /onesie, /decisions
- 외부 출력: /draft, /feedback
- 분석: /cohort (MoM 추세)

ASTRA 추론·검색 엔진 (v2.2.183~192):
- v2.2.183 Conflict Surface — scoring.conflictSeverity 를 [CONFLICT WARNINGS] 블록으로
  서피스 + 교차-문서 발산(Jaccard) 감지
- v2.2.184 Chain-of-Verification — [VERIFICATION CHECKLIST] 답변 작성 전 그라운딩 자기 점검
  (instructional, strictMode 옵션)
- v2.2.185 Actionability Scoring — 최근 슬래시 명령 + 열린 파일 신호로 검색 결과 재가중
- v2.2.186 Temporal Markers + Distillation Loop — LongTerm/Episodic 만료 필터 +
  30일+ stale episode → LongTerm 'episode-digest' 승급 (수동 /memory distill + 세션 종료 자동)
- v2.2.187 Hierarchical Context Window + LLM Semantic Re-rank — 3-level 추상도 매칭
  + 토큰 예산 통과 후 LLM 1회로 의도-부합 재정렬 (opt-in)
- v2.2.190 Intent Clarification + Citation Trace — 모호 차원 감지 시 역질문 우선
  + 답변 끝 사용 출처 한 줄 정리
- v2.2.191 Post-hoc Self-Check — 답변 완료 후 별도 LLM 호출 1회로 답함/그라운딩/모순 평가,
  footer 한 줄로 표시 (opt-in, semantic re-rank 와 같은 안전 fallback 패턴)
- v2.2.192 Terminology Dictionary — .astra/glossary.md 사용자 편집 파일 + Term Check
  지침 통합 + /glossary init/path/reload
- v2.2.193 /help — 카테고리별 명령 목록 + 6종 verification 블록 현재 on/off

신규 모듈:
- src/retrieval/{conflictBlock,coveBlock,actionabilityScoring,hierarchicalLevel,
  semanticRerank,intentClarification,citationTrace,terminologyBlock}.ts
- src/memory/distillation.ts + types.ts 에 expiresAt/promoted/episode-digest 추가
- src/agent/postHocSelfCheck.ts
- src/features/{customers,feedback,hire,runway}/*.ts (event-sourced stores)

ASTRA 검증 5종 자동 주입 (buildAstraModeSystemPrompt, casual 모드 제외):
[INTENT CLARIFICATION GUIDANCE] (답변 시작 전) → [TERMINOLOGY DICTIONARY] +
[CONFLICT WARNINGS] + [VERIFICATION CHECKLIST] (작성 중) → [CITATION TRACE] (끝)
+ 6번째: Post-hoc Self-Check footer (답변 완료 후, opt-in)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 16:05:30 +09:00
g1nation 0a97324f1b feat: v2.2.92 → v2.2.158 — god-file 분해 + Stocks feature + 대화 연속성
R56–R59: agent.ts 2731→1529줄 god-file 분해 (25 modules)
  · attrParsers + LLM 메서드 8개 (callNonStreaming, streamChatOnce 등)
  · executeActions 415줄 → 8 handler 그룹 (file/run/list/brain/calendar/sheets/tasks)
  · handlePrompt 1100줄 → 7 phase 모듈 (system prompt + budget + autoContinue 등)

R50–R55: extension.ts 1145→349줄 (telegram/settings/provider commands 분리)

Stocks feature 신규: /stocks slash command (v2.2.152~158)
  · .astra/stocks.json 저장소 + Yahoo Finance 현재가 갱신
  · 8 키워드 필터 (ROE/성장성/유동성/수익성/영업효율/기술력/안정성/PBR)
  · Naver 시가총액 페이지 JSON API (m.stock.naver.com) 발굴
  · LLM Top 5 매력도 분석 + Telegram 자동 보고서
  · KST 09:00/15:00 watcher 자동 모니터링

대화 연속성 (v2.2.150~157):
  · [PRIOR TURN CONCLUSION] block 으로 직전 결론 anchor
  · thin follow-up 분류 → boilerplate 헤더 suppression
  · slash 명령 결과 chatHistory mirror (capture wrapper)
  · echo/parrot 금지 system prompt rule

기타: /stocks 슬래시 자동완성 dropdown UI, Naver JSON API 전환 (cheerio 제거)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 09:59:32 +09:00
g1nation 4153f640c2 feat: v2.2.83 → v2.2.91 — info prompt 강화 + 사용자 노출 설정 + 답변 포맷 정리
[v2.2.83] /youtube info 프롬프트 강화
- 비유 방향 보존 룰 (Hugging Face=자료실 같은 짝 뒤집기 방지)
- 신뢰도 라벨 4종 ([근거 명시] / [화자 주장] / [가정] / [정리자 추론])
- 타임스탬프 fail 룰 (인용·구간 요약 모두 mm:ss 필수)
- "정리자 노트" 별도 섹션으로 추론 격리

[v2.2.85] polishPersona self-check 5가지
- 정리·리뷰·요약 답변 출력 직전 머릿속 체크:
  (1) 사실 오류  (2) 없는 내용 추가  (3) 뉘앙스 유지
  (4) 중요도 비례  (5) 중복 제거

[v2.2.86] chunkedSwitchTokens 절대 임계값 게이트
- 입력 < 50k 토큰이면 키워드·길이 트리거 무시하고 단일 호출
- 큰 컨텍스트 모델(131k+)에서 chunked 과잉 발동 방지

[v2.2.87] MAX_SECTIONS 5→3 cap
- 총 호출 7회 → 5회 (outline + 3 section + polish)
- 사용자 피드백 "6+회는 과하다"

[v2.2.88] 이모지 사용 금지 룰
- polishPersona / directPersona / sectionPersona 모두 적용
- 사용자 피드백 "이모지는 시각 노이즈"

[v2.2.89] 사용자 노출 설정 두 항목
- chunkedMaxSections config 신규 (default 3, 1~10 clamp)
- MAX_SECTIONS_HARD_CEILING (10) 으로 안전망 격상
- Astra Settings 패널 "고급" 섹션에 두 슬라이더 노출

[v2.2.90] 가이드 문구 단순화
- "작은 모델은 낮추라" 문구 빼고 일관되게 50000 권장으로

[v2.2.91] 답변 포맷 가독성 fix
- persona 의 "TL;DR" 표현 전부 "한 줄 요약" 으로 단일화
- stripMarkdownFormatting 에 헤더 후 빈 줄 강제 삽입
  (marked.parse 가 라벨·본문을 별도 단락으로 인식 → 시각 분리)

[테스트] 400/400 통과 (resilience_stress + chunked flow + MAX_SECTIONS cap 등)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 14:12:56 +09:00
g1nation ded3eea7ce feat: v2.2.74 → v2.2.82 — chunked writer + 코드 리뷰 패치 + /youtube 확장
주요 변경:

[chunked writer 아키텍처 (v2.2.74~v2.2.75)]
- 5-stage 다중 에이전트(planner/researcher/reflector/writer/synthesizer)
  파이프라인 제거 → 단일 ChunkedWriter 의 outline → section[N] → polish
  3-step 으로 교체. 본문 분석에서 추상화 손실 / 토큰 폭증 문제 해소
- 답변 길이 자동 분기: 짧은 prompt 는 fast-path direct 1회 호출,
  본문 분석은 chunked. outline 빈 배열도 direct 폴백

[코드 리뷰 9개 항목 일괄 패치 (v2.2.76)]
- /research polling hang 방어 (heartbeat + status 정규화 + 연속 실패 abort)
- 회사 모드 dispatcher abort 신호를 AIService.chat 까지 전달
- bridgeFetch 에 onHeartbeat 콜백 도입 (slow endpoint 사용자 친화적)
- dead code 정리: reflectionPersister.ts 제거 + enableReflection 등 좀비 config 키
- parseOutline 의 empty vs fallback reason 명시적 분리
- chatHandlers 의 회사 모드 케이스 ~325줄을 src/sidebar/companyHandlers.ts 로 분리
- Intent Alignment 라운드 한도 도달 시 smart 모드 자동 진행
- LM Studio doSwitch unload 실패 시 currentModel 정리 + load 강행
- retrieval informationDensity → queryCoverage 정합화

[/youtube 채널 지원 (v2.2.77~v2.2.82)]
- 채널/플레이리스트 URL 자동 감지 + n:N 으로 영상 개수 지정 (최대 50)
- 채널 루트 URL 에 /videos 탭 자동 append (yt-dlp enumeration 정상화)
- 영상별 순차 처리 (queue 패턴) + i/N 진행 표시 + 마지막 통계 요약
- mode:info / mode:benchmark / mode:both 분석 모드 분기
  - info: 영상 내용을 지식 카드로 추출 (튜토리얼·강의·뉴스용)
  - benchmark: 4-렌즈 대본 역기획서 (콘텐츠 제작 벤치마크용)
  - both: 둘 다 (기본)
  - bare keyword 도 허용: /youtube <url> n:1 info
- bridge 에러 메시지 [object Object] 깨짐 수정 (구조화 에러 추출)
- "패키지 없음" 등 환경 의존성 에러에 자동 가이드 첨부

[Astra: Setup Datacollect Dependencies 명령 추가 (v2.2.80)]
- Python 자동 감지 + yt-dlp / youtube-transcript-api 자동 설치
- macOS PEP 668 환경 자동 폴백 (--user --break-system-packages)
- /youtube 등에서 패키지 미설치 감지 시 "Install Now" 버튼 notification

[테스트]
- tests/agentEngine.test.ts 를 chunked flow 에 맞춰 전체 재작성
- tests/resilience_stress.test.ts Scenario B/D 를 role-aware mock 으로 갱신
- 399/399 통과

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 23:13:21 +09:00
g1nation 0712014fcb chore: v2.2.73 — ASTRA-DEBUG 로그 레벨 + webview CSP font-src 보강
- ASTRA-DEBUG 정상 흐름 로그를 console.error → logInfo/console.log 로 강등
  (chatHandlers, extension, slashRouter): DevTools에 ERR로 찍히던 오탐 제거
- sidebar webview에 명시적 CSP meta 추가 + font-src에 data: 허용
  (sidebar.html, sidebarProvider._getHtml): VS Code outer iframe이 codicon.ttf를
  data:font/ttf 로 inject하면서 기본 CSP에 막혀 매 prompt 마다 violation
  경고가 찍히던 문제 해소
- 누적된 LM Studio / agent / 컨텍스트 매니저 / 테스트 갱신 동반

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 15:52:19 +09:00
koriweb 49f941386f feat: v2.2.63 — 한국어 오타 최소화 (채팅 temperature 설정 + anti-glitch 샘플링)
- streamer.ts: LM Studio SDK 호출에 topP/topK/minP/repeatPenalty 추가
  — 저확률 오답 토큰을 잘라 한글 음절 깨짐(붕괴→붕점) 억제
- 채팅 기본 temperature 0.7 → 0.3 (분석/업무형 답변 안정화)
- 신규 설정 g1nation.chatTemperature — Settings 패널 '고급' 섹션에서
  조절 가능 (config.ts / settingsPanelProvider / settings-panel.html+js)

chronicle 기록(ADR-0022, ADR-0023) 포함.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 19:09:01 +09:00
koriweb 9cddf2aabc fix(agent): v2.2.62 — 출력 degeneration 방어
- 재시작 감지: auto-continuation이 "이어쓰기" 대신 답변을 처음부터
  재생성하면 버림 → 분석이 두 번 나오던 문제 제거
- degeneration 정리 패스(cleanDegeneratedOutput): 문자 벽(같은 기호 8개+),
  (Note:…) 메타 노트, Candidate records 내부 지시문 누출,
  (질문 의도:…)/[핵심 확인 질문] 누출, 연속 중복 문단 제거

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 16:13:39 +09:00
koriweb 745ebc57f6 Update project files 2026-05-22 15:26:10 +09:00
koriweb 8016ef18fa Update project files 2026-05-22 15:00:14 +09:00
koriweb 0834608f7e Bump version to 2.2.27 and update package 2026-05-18 16:36:41 +09:00
g1nation 86cacaeb03 Update ConnectAI codebase 2026-05-18 08:15:01 +09:00
g1nation 88664c7c6e v2.2.19: Cloud Model Providers Support (OpenRouter, Anthropic, Gemini) 2026-05-16 23:34:35 +09:00
g1nation 9ca95ab997 v2.2.15: Astra Office Refactor & Multi-Service Integration 2026-05-16 22:07:06 +09:00
koriweb 72412450c3 feat: v2.2.3 - Stability, Self-Reflector & Intent Alignment
- 버전 2.2.3 상향 및 PATCHNOTES.md 업데이트

- [신규] src/features/selfReflector/ - 성찰 실행/검증/프롬프트 모듈 추가

- [신규] intentAlignment.ts, intentClassifier.ts - 의도 정렬 시스템 추가

- [신규] pixelOfficeState.ts - 픽셀 오피스 상태 관리 추가

- sidebarProvider, dispatcher, chatHandlers 핵심 로직 최적화

- astra-2.2.3.vsix 패키지 생성 완료 (298 tests PASS)
2026-05-15 14:16:14 +09:00
g1nation 39386f90b5 release: v2.0.5 - Telegram Business Reporting & Core Resilience 2026-05-13 23:54:34 +09:00
g1nation e85e11aac6 release: v2.0.1 - Advanced Knowledge Mix & Architectural Intelligence 2026-05-13 22:05:39 +09:00
koriweb 089abf22db refactor: optimize core engine and retrieval logic for v2.80.43 2026-05-13 19:23:57 +09:00
g1nation b7ea805c07 chore: version up to 2.80.40 and package with ADR-0008 2026-05-13 00:44:57 +09:00
g1nation d2269297ea chore: version up to 2.80.39 and package with UI/config polish 2026-05-13 00:39:28 +09:00
g1nation eb36cec050 chore: version up to 2.80.38 and package with refined recovery 2026-05-13 00:15:45 +09:00
g1nation 6c4bc3494f chore: version up to 2.80.37 and package with response recovery 2026-05-12 23:55:00 +09:00
g1nation e0af15767a chore: version up to 2.80.36 and package with UI/UX refinement 2026-05-12 23:41:18 +09:00
g1nation f6b27a125b chore: version up to 2.80.35 and package with experience memory 2026-05-12 23:23:23 +09:00
g1nation 065e598cca chore: version up to 2.80.34 and package 2026-05-12 22:54:21 +09:00
g1nation 6347a223a7 release: v2.80.32 - LM Studio SDK resilience & auto-recovery 2026-05-11 13:19:07 +09:00
g1nation 5d3df0816f chore: version up to v2.80.31, clean up agent logic, and fix tests 2026-05-11 13:02:06 +09:00
g1nation ec71014481 Build: Release v2.80.28 2026-05-10 22:41:35 +09:00
g1nation 3220a126fd chore: bump version to 2.80.27 and update core features 2026-05-09 01:16:12 +09:00
g1nation 5ffb472d22 Update Astra: v2.80.19 - Refactoring Sidebar, LM Studio integration, and new tests 2026-05-08 23:14:47 +09:00
g1nation d451a082dd feat: refactor AI engine logic, remove cross-engine fallback, add retry with backoff, and bump version to 2.80.18 2026-05-08 01:24:12 +09:00
koriweb 6894152892 chore: bump version to 2.80.17 and refine agent streaming logic 2026-05-07 18:12:57 +09:00
koriweb cf6f33dd5c feat: Ghost Response retry and PID logging for bridge (v2.80.16) 2026-05-07 16:04:54 +09:00
koriweb d9a2ebfedd fix: proactive context compression for LM Studio small models - compress BEFORE fetch not after error 2026-05-07 15:57:48 +09:00
koriweb faf3060ae7 fix: n_ctx retry in createStreamingRequest - compress msgs at API level not handlePrompt 2026-05-07 15:48:13 +09:00
koriweb f190ea41ff fix: bridge ERR log level + n_ctx auto-retry with compressed prompt 2026-05-07 15:43:19 +09:00
koriweb 47e35ab62c fix: revert bad ctx trimming add n_keep>n_ctx GPU error detection 2026-05-07 14:03:17 +09:00
koriweb 99ddf6a3cf chore: version bump to 2.80.9 and fix bridge/lmstudio issues 2026-05-07 13:52:38 +09:00
koriweb 4b649194aa fix(agent): strip Astra formatting when custom agent selected v2.80.4 2026-05-06 13:59:14 +09:00
koriweb 41bab1103a fix: ensure selected agent prompt takes absolute precedence over default format 2026-05-06 13:42:46 +09:00
koriweb 2d3f5c28d5 fix: agent selection bypasses multi-agent workflow to ensure selected agent system prompt is applied 2026-05-06 13:36:21 +09:00
koriweb 60b46986e1 fix: stop Astra from asking permission instead of reading files directly 2026-05-06 12:17:56 +09:00
koriweb 8ece47f961 PDFVisionFallback 2026-05-06 11:55:45 +09:00
koriweb 00f62bdc34 Updates 2026-05-06 11:46:38 +09:00
g1nation fc07e00f0c [Core] Disable automatic appending of redundant headers and internal logs in agent.ts 2026-05-05 16:19:02 +09:00
g1nation f4c22bda54 [UX] Refactor system prompt for 'Verdict -> Proof -> Action' optimized output structure 2026-05-05 15:51:20 +09:00
g1nation d333042e7c [RAG] Implement visual conflict and density metadata tags for enhanced context intelligence 2026-05-05 15:29:16 +09:00
g1nation ccb5ca515e feat(cognition): integrated empathetic acknowledgment and reordered response flow v2.66.0 2026-05-05 10:28:45 +09:00
g1nation 71e39ad78e feat(core): upgrade to v2.65.0 with Cognition Layer & Proactive Advisor
- Integrated v4.0 Operational Policy into AgentEngine and AgentExecutor.
- Added Context Amplification for policy-driven reasoning.
- Implemented Proactive Advisor for next-action decision forks.
- Added CognitionAudit diagnostics for real-time policy monitoring.
- Updated test suites to support dual-execution cognition patterns.
2026-05-04 22:42:08 +09:00