# AX Agent 로드맵 (전면 재작성) ## 1. 보존 이력 (요약만 유지) - v0.5.0: MCP 연동, 모델 폴백, 대화 분기, 프리뷰/토큰 관리, 에이전트 루프 강화. - v0.5.1: 고급 스킬 확장, 워크플로우 분석기, 런타임 감지. - v0.6.0: 멀티패스 문서 생성, 데이터 피벗/템플릿/이미지 분석 계열 도구 확장. - v0.7.0: Plan Mode, 병렬 도구 실행, 프로젝트 규칙 주입, 테스트 루프 자동화. - v0.7.1: 도구 실행 후 검증 게이트 강화, 피드백 컨텍스트 개선. - v0.7.2: 컨텍스트 압축/복원 안정화, UX/성능 보완. ## 2. 재작성 기준 - 기준 레퍼런스: `claw-code/claw-code-f5a40b86dede580f6543bf8926c9af017eea9409/src`. - 목표: 동작 순서, 예외/검증 흐름, 세션 내구성에서 동일 품질 달성. - 원칙: AX 코드 스타일로 재구성(표현/구조 변경), 기능적 동등성 유지. ## 3. 2026 실행 계획 (v0.7.3 ~ v0.8.0) | Phase | 참조 대상 (`claw-code`) | AX 적용 위치 | 완료 조건 | 품질 판정 시나리오 | |---|---|---|---|---| | A (v0.7.3) Hook/Permission 계약 고도화 | `src/utils/hooks.ts`, `src/utils/hooks/hookEvents.ts`, `src/utils/permissions/PermissionUpdate.ts`, `src/utils/permissions/permissionSetup.ts` | `src/AxCopilot/Services/Agent/AgentHookRunner.cs`, `src/AxCopilot/Services/Agent/AgentLoopService.cs`, `src/AxCopilot/Models/AppSettings.cs`, `src/AxCopilot/ViewModels/SettingsViewModel.cs`, `src/AxCopilot/Views/SettingsWindow.xaml` | Hook JSON 출력(`updatedInput`, `updatedPermissions`, `additionalContext`) 반영 완료. Plain text 훅 하위호환 유지. 훅 실패 비차단 유지. | Pre-hook 입력 변형 적용 시 도구 입력이 실제 변경되는지 검증. 권한 업데이트 후 동일 run 내 권한 판정이 즉시 반영되는지 검증. | | B (v0.7.4) Plan/Run 상태 내구성 강화 | `src/utils/plans.ts`, `src/utils/sessionStorage.ts` | `src/AxCopilot/Services/ChatSessionStateService.cs`, `src/AxCopilot/Services/TaskRunService.cs`, `src/AxCopilot/Services/TaskRunStore.cs`, `src/AxCopilot/Views/ChatWindow.xaml.cs` | Plan 단계 승인/수정 이력 영속화. 앱 재시작 후 run 재개 시 마지막 실행 지점 정확 복원. 중복 실행/중복 이벤트 0건. | 실행 중 앱 종료 → 재실행 → 같은 탭/대화에서 run 상태와 최근 실행 이력이 일치하는지 검증. | | C (v0.7.5) 세션/이벤트 로그 정규화 | `src/utils/sessionStorage.ts`(이벤트 기록/복원 규약), `src/utils/hooks/hookEvents.ts` | `src/AxCopilot/Models/ChatModels.cs`, `src/AxCopilot/Services/ChatSessionStateService.cs`, `src/AxCopilot/Services/AppStateService.cs` | 이벤트 스키마 정리(도구 호출/결과/권한/훅/요약). replay 시 순서 불일치 0건. run 단위 요약 리포트 생성 가능 상태. | 동일 세션을 여러 번 로드해도 실행 이력 순서/상태가 변하지 않는지 검증. | | D (v0.7.6) 명령/도구 선택 정확도 개선 | `src/commands.ts`, `src/Tool.ts` | `src/AxCopilot/Services/Agent/AgentLoopService.cs`, `src/AxCopilot/Services/Agent/AgentLoopParallelExecution.cs`, `src/AxCopilot/Services/LlmService.ToolUse.cs` | 도구 별칭 정규화 규칙 강화. unknown-tool 재시도 루프 방지. 실패 유형별 복구 흐름 표준화. | 오타/별칭/비활성 도구 요청 시 복구 프롬프트로 정상 도구로 수렴하는지 검증. | | E (v0.8.0) 품질 게이트 최종 정렬 | `src/query.ts`, `src/QueryEngine.ts`(루프 종료/완료 기준), `src/utils/sessionStorage.ts` | `src/AxCopilot/Services/Agent/AgentLoopService.cs`, `src/AxCopilot/Services/Agent/AgentLoopTransitions.Execution.cs`, `src/AxCopilot/Services/Agent/AgentLoopTransitions.cs` | 코드/문서 작업별 완료 게이트를 증거 기반으로 고정. 내부 벤치마크 목표 성공률 충족. 완료 응답 근거 누락률 최소화. | 코드수정/문서생성/권한거부/실패복구 혼합 시나리오에서 조기 완료 없이 근거 기반 종료하는지 검증. | ## 4. 공통 검증 규칙 - 모든 단계: `dotnet build` 경고 0/오류 0. - 고위험 변경: 최소 1개 이상 재현 테스트 추가. - 운영모드(`internal`/`external`) 보안 정책 위반 0건. ## 5. 즉시 착수 항목 1. 내부 벤치마크(기본 loop/복구/권한/hook) 결과를 릴리즈 체크리스트에 연동 유지. 2. 세션 replay 안정성(`Suite=ReplayStability`) 전건 통과를 릴리즈 게이트로 운영. 3. 패리티 수치(테스트 통과 수/게이트 상태)를 로드맵 문서 간 동일 문구로 유지. ## 6. 최신 검증 스냅샷 (2026-04-03) - `dotnet test --filter "Suite=ParityBenchmark"`: 13/13 통과. - `dotnet test --filter "Suite=ReplayStability"`: 14/14 통과. - `dotnet test`: 379/379 통과. ## 7. 명령/도구 보강 스냅샷 (2026-04-04) - 슬래시 명령 고도화: `/chrome`, `/mcp`, `/verify`, `/commit`, `/settings`, `/permissions` 하위 동작 정리. - `/mcp` 상태 라벨 표준화: `Connected`, `NeedsAuth`, `Configured`, `Disconnected`, `Disabled`. - `/chrome` 런타임 재시도: 초기 probe 실패 시 `/mcp reconnect all` 자동 수행 후 1회 재평가. - Git 정책 정렬: `git_tool`의 `commit` 비활성 문구 제거(로컬 커밋 경로와 정책 일치). - `/commit` 부분 커밋 지원: `files:path1,path2 :: 메시지` 형식으로 선택 파일만 stage+commit 가능. - 테스트 보강: - `ChatWindowSlashPolicyTests`: 슬래시 파서/검증 프롬프트/MCP 상태 라벨 단위 검증 추가. - `AgentParityToolsTests`: `git_tool commit` 레거시 비활성 메시지 회귀 방지 테스트 추가. ## 7. 권한 Hook 계약 (P2 마감 기준) - lifecycle hook 키: - `__permission_request__` (pre) - `__permission_granted__` (post) - `__permission_denied__` (post) - payload 기준 필드: `runId`, `tool`, `target`, `permission`, `granted`, `reason`. - 우선순위: 1. Hook `updatedPermissions`가 현재 run의 `AgentContext.ToolPermissions`를 즉시 갱신. 2. 갱신 후 `context.CheckToolPermissionAsync()`로 최종 판정. 3. hook 실패/예외는 non-blocking(권한 흐름 지속). 4. `additionalContext`는 가능한 경로에서 메시지 컨텍스트로 반영. - 2026-04-04(추가): `/mcp add/remove/reset` 확장, `tool_search` 기반 복구 프롬프트 강화, 슬래시 힌트 밀도(`rich/balanced/simple`) 연동. - 2026-04-04(추가2): /mcp login/logout 세션 인증 토큰 지원, /mcp status·/chrome 진단에 Auth(Session) 반영. - 2026-04-04(추가3): 권한 UX 통합(/permissions·/allowed-tools·/settings permissions), 복구 혼합 테스트 보강, 좌측 패널 실패 필터 노출 정책 rich 전용으로 정렬. - 2026-04-04 20:27 (KST): Added a dedicated AX Agent theme layer and separated in-chat theme selection into style (`claw/codex/slate`) and mode (`system/light/dark`). - 2026-04-04 18:03 (KST): Added a Codex-style context usage ring to the composer, exposed direct `/compact` execution from the footer, and surfaced Git branch/change status in the Cowork/Code footer when a repository is connected. - 2026-04-04 18:03 (KST): Simplified the Cowork footer by removing document format/design selectors and moved those defaults into the AX Agent settings page, with output format centered on AI automatic selection. - 2026-04-04 18:03 (KST): Minimized AX Agent message headers, changed model quick controls to a popup panel, flattened slash command rows into a Codex-style list, and aligned model/permission/template controls to the same dropdown panel language. - 2026-04-04 18:03 (KST): Expanded the Git branch badge into a dropdown panel, flattened permission/template popups into row-based lists, and made AI message action bars remain visible for the selected message. - 2026-04-04 18:03 (KST): Flattened the data-usage popup, added Git branch switching/creation inside the dropdown, and surfaced quick model chips so the inline model panel relies less on ComboBox controls. - 2026-04-04 18:03 (KST): Replaced the visible inline model/service selectors with custom cards and row lists so the AX Agent quick panel more closely follows the Codex/claude-code control feel. - 2026-04-04 18:03 (KST): Added recent/favorite grouping to the preset popup and enabled right-click pinning so the preset picker better matches Codex-style frequent-use navigation. - 2026-04-04 18:03 (KST): Added preset search, made selected messages visually persistent, and flattened more of the permission detail popup into row-based information to keep the panel lighter. - 2026-04-04 18:03 (KST): Switched recent permission-denied actions to flat row actions, exposed Git upstream state in the branch panel, and made inline quick actions read more like custom stateful cards. - 2026-04-04 19:07 (KST): Unified AX Agent popup panels around the same row-driven language by flattening permission override details, simplifying collapsible section chrome, adding keyboard-friendly row actions, and turning Git change stats into compact pills. - 2026-04-04 19:07 (KST): Refined message actions into custom pill buttons with visible labels, fixed the custom action template so border visuals render correctly, and tightened composer/footer density so model, preset, token, permission, and Git controls feel like one system. - 2026-04-04 19:11 (KST): Reworked the AX Agent timeline so execution events render like thin Codex-style inline logs instead of heavy banners, softened older-history loading into an outline pill, and aligned planning cards to the same message-width rhythm. - 2026-04-04 19:25 (KST): Tightened user/assistant/streaming cards under one density rule by compressing vertical spacing, card padding, header typography, and message meta spacing to a more Codex-like rhythm. - 2026-04-04 19:25 (KST): Flattened the composer further by reducing input, model, preset, token, and footer control heights so the bottom work area reads more like a single claw-code-style strip. - 2026-04-04 19:25 (KST): Matched AX Agent overlay quick settings to inline quick settings with the same `label · value` structure, lighter explanatory copy, and unified section naming. - 2026-04-04 19:48 (KST): Fixed Chat sidebar topic exploration so clicking the left topic entry surfaces the preset cards again, and made preset selection immediately sync category label, conversation metadata, and saved state. - 2026-04-04 19:48 (KST): Reduced permission/data-usage UI lag by synchronizing conversation settings before persistence, switching popup rows to immediate mouse-down activation, and refreshing overlay status labels in the same turn. - 2026-04-04 19:48 (KST): Widened the AX Agent message lane, softened the yellow cast of the Claude-style theme preset, aligned the data-usage button with the permission button language, and routed the tray settings entry directly into AX Agent settings when AI is enabled. - 2026-04-04 20:41 (KST): Permission surface re-aligned to the four claw-code public modes, legacy `질문 없이 진행` exposure removed from AX Agent popups/slash guidance, and the in-chat settings/sidebar information hierarchy simplified to match the lighter Claude/Codex-style layout direction. - 업데이트: 2026-04-04 22:05 (KST) - AX Agent 고급 설정 오버레이를 설명형 row + 커스텀 On/Off 선택 구조로 개편하고, 내부 기능명을 사용자 친화 문구로 정리함. - 업데이트: 2026-04-04 20:58 (KST) - AX Agent 서비스 설정의 내부 서비스 모델 선택을 등록 모델 칩 기반으로 정리하고, vLLM SSL 우회는 모델 등록/편집 다이얼로그에서만 노출되도록 설정 표면을 축소함. - 업데이트: 2026-04-04 21:02 (KST) - composer 컨텍스트 카드를 hover 중심의 간단 표기(`%` + `K/M` 사용량)로 정리하고, 최대 컨텍스트 설정 상한을 1M까지 확장함. - 업데이트: 2026-04-04 21:02 (KST) - AX Agent 서비스 설정의 `Gemini/Claude`도 모델 칩 선택 구조로 통일하고, composer 모델 버튼을 `서비스 · 모델` 문법으로 맞춰 설정-실행 흐름의 시각 언어를 정리함. - 업데이트: 2026-04-04 23:14 (KST) - 트레이 좌클릭 기본 진입점을 AX Agent로 전환하고, 우클릭 메뉴 상단에 앱 버전 헤더를 추가해 AX Agent 중심 진입 흐름을 강화함. - 메인 설정 저장 완료 후 열린 AX Agent 창이 즉시 테마/모델/권한/하단 상태줄을 다시 읽어오도록 fan-out 경로를 추가해 설정 반영 지연을 줄임. - DraftQueue kind 분류를 message/command/steering/direct/followup 기준으로 재정리해 큐 타입과 실제 입력 성격이 더 잘 맞도록 보강함. - 업데이트: 2026-04-04 23:23 (KST) - AX Agent가 `SettingsService.SettingsChanged`를 직접 구독하도록 바꿔 메인 설정/AX Agent 설정 어느 경로에서 저장하더라도 테마, 모델, 권한, 데이터 활용, composer, 대기열 UI가 즉시 동일 상태를 반영하도록 fan-out을 통합함. - AX Agent 설정 저장 경로에서 표현 수준을 무조건 `rich`로 덮어쓰던 로직을 제거해 `풍부하게 / 적절하게 / 간단하게`가 다른 설정 저장 경로에서도 유지되도록 보정함. - DraftQueue 패널은 `실행 중 / 다음 작업 / 보류 / 완료 / 실패` 개별 섹션 구조로 다시 나눠 현재 실행 흐름과 재시도 대기, 결과 이력을 더 빠르게 파악할 수 있도록 정리함.