diff --git a/README.md b/README.md index 0c88988..31f5a4d 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,10 @@ Windows 전용 시맨틱 런처 & 워크스페이스 매니저 개발 참고: Claw Code 동등성 작업 추적 문서 `docs/claw-code-parity-plan.md` +- 업데이트: 2026-04-05 15:34 (KST) +- AX Agent 개선 계획 기준을 이전 AX 비교본이 아니라 실제 `claw-code` 런타임 축으로 다시 고정했습니다. 현재 참조 spine은 `bootstrap/state.ts -> bridge/initReplBridge.ts -> bridge/sessionRunner.ts -> screens/REPL.tsx -> components/Messages.tsx -> components/StatusLine.tsx` 입니다. +- 이에 맞춰 AX Agent 개선도 `상태 정규화 -> 실행 준비 공통화 -> AgentLoop 이벤트 정규화 -> 타임라인 렌더 일원화 -> 컴포저/상태바 단순화 -> 복구/재개 검증` 순서로 진행하도록 parity 문서를 갱신했습니다. + - 업데이트: 2026-04-05 11:22 (KST) - AX Agent 채팅 복구 1차로 컴포저를 하단 고정 배치로 조정해 세로 공간을 꽉 채우며 커 보이던 문제를 줄였습니다. - 전송 직후 사용자 버블을 직접 UI에 꽂지 않고 대화 모델 기반 `RenderMessages()` 재렌더를 먼저 타도록 정리해, 중복 렌더와 빈 버블 누적 가능성을 낮췄습니다. diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 8c2467c..5b4584b 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -1,5 +1,7 @@ # AX Copilot - 媛쒕컻 臾몄꽌 +- Document update: 2026-04-05 15:34 (KST) - Rebased the AX Agent improvement plan on actual `claw-code` runtime files instead of prior AX snapshots. The active reference spine is `src/bootstrap/state.ts -> src/bridge/initReplBridge.ts -> src/bridge/sessionRunner.ts -> src/screens/REPL.tsx -> src/components/Messages.tsx -> src/components/StatusLine.tsx`. +- Document update: 2026-04-05 15:34 (KST) - Locked the AX implementation order to the same quality sequence used by that spine: runtime state canonicalization, prepared execution unification, loop event normalization, timeline render parity, composer/status strip simplification, and recovery/resume validation. - Document update: 2026-04-05 07:11 (KST) - Simplified the AX Agent footer for Cowork/Code by removing the duplicated `MoodIconPanel` chip group from those tabs and leaving workspace context only in the main folder path row. Also removed the outline border from the data-usage button so the footer option strip reads flatter and less pill-heavy. - Document update: 2026-04-05 07:08 (KST) - Improved AX Agent responsiveness in three hot paths: added an ordered meta cache in `ChatStorageService` so repeated conversation-list refreshes stop re-sorting the full meta set every time, short-circuited `SaveConversationSettings()` when permission/data-usage/mood/output-format values are unchanged, and debounced the sidebar conversation search refresh to avoid re-filtering on every keystroke. - Document update: 2026-04-05 02:00 (KST) - Reworked the AX Agent in-chat gear overlay navigation itself to match the restored internal settings taxonomy: `basic / chat / cowork / code / dev / tools / skill-block`. The left nav labels now follow that scheme, and the overlay rows/toggles are regrouped per tab instead of the earlier `common / service / permission / advanced` split. diff --git a/docs/claw-code-parity-plan.md b/docs/claw-code-parity-plan.md index 8ab19d8..1f5b3e1 100644 --- a/docs/claw-code-parity-plan.md +++ b/docs/claw-code-parity-plan.md @@ -3,11 +3,94 @@ ## Scope - Align AX Copilot with claw-code quality for loop reliability, permission/hook behavior, and session durability. +## Update +- Updated: 2026-04-05 15:34 (KST) +- Rebased the AX Agent improvement plan on actual `claw-code` runtime files instead of earlier AX snapshots. The reference spine is now `src/bootstrap/state.ts -> src/bridge/initReplBridge.ts -> src/bridge/sessionRunner.ts -> src/screens/REPL.tsx -> src/components/Messages.tsx -> src/components/StatusLine.tsx`. +- AX Agent work should follow that same quality order: state first, execution second, render last. UI-only fixes that bypass state/execution should be treated as temporary. + ## Preserved History (Summary) - Core loop guards and post-tool verification gates are already partially implemented. - Plan Mode, parallel tool execution, and unknown-tool recovery are in place. - Session restore hardening is ongoing. +## Reference Map + +| claw-code reference | AX apply target | completion criteria | quality criteria | +|---|---|---|---| +| `src/bootstrap/state.ts` | `src/AxCopilot/Views/ChatWindow.xaml.cs`, `src/AxCopilot/Services/Agent/AxAgentExecutionEngine.cs`, `src/AxCopilot/Services/ChatStorageService.cs` | one canonical runtime/session state for current turn, queue, retry, execution events, and persisted snapshot | reopen/retry/queue flows do not create duplicate or blank assistant messages | +| `src/bridge/initReplBridge.ts` | `src/AxCopilot/Services/Agent/AxAgentExecutionEngine.cs`, `src/AxCopilot/Services/LlmService.cs` | send/regenerate/retry/queued follow-up/slash all enter through one prepared-execution path | same input under same settings takes same execution route regardless of entry point | +| `src/bridge/sessionRunner.ts` | `src/AxCopilot/Services/Agent/AgentLoopService.cs`, `src/AxCopilot/Services/Agent/AgentLoopTransitions.cs`, `src/AxCopilot/Services/Agent/AgentLoopTransitions.Execution.cs` | tool start/result/error/progress normalized once inside loop layer | Cowork/Code no longer flash repeated status strings or overshare debug payloads | +| `src/bridge/bridgeMessaging.ts` | `src/AxCopilot/Views/ChatWindow.xaml.cs`, `src/AxCopilot/Services/Agent/AgentLoopService.cs` | inbound execution events separated from display-only events before UI render | execution event replay does not duplicate visible timeline banners | +| `src/screens/REPL.tsx` | `src/AxCopilot/Views/ChatWindow.xaml`, `src/AxCopilot/Views/ChatWindow.xaml.cs` | screen state transitions, queue flow, retry flow, and composer state use shared runtime helpers | window resize, queue chaining, and retry feel stable instead of UI-patched | +| `src/components/Messages.tsx` | `src/AxCopilot/Views/ChatWindow.xaml.cs` | timeline derives from normalized conversation/session state only | no token-only completions, blank cards, or direct injected duplicates | +| `src/components/StatusLine.tsx` | `src/AxCopilot/Views/ChatWindow.xaml`, `src/AxCopilot/Views/ChatWindow.xaml.cs` | status strip computed from debounced runtime state, not multiple imperative refresh calls | metadata stays lightweight and does not overpower message timeline | + +## AX Agent Improvement Phases + +### Phase A. Runtime State Canonicalization +- Reference: `src/bootstrap/state.ts` +- AX apply location: `src/AxCopilot/Views/ChatWindow.xaml.cs`, `src/AxCopilot/Services/Agent/AxAgentExecutionEngine.cs`, `src/AxCopilot/Services/ChatStorageService.cs` +- Completion criteria: + - `Chat`, `Cowork`, `Code` all update one shared runtime/session state model. + - queue, retry, post-compaction, and execution-event state can be restored after reopen. +- Quality criteria: + - reopening a conversation reproduces the same visible timeline without extra assistant cards. + - queue and execution badges remain in sync with the stored conversation. + +### Phase B. Prepared Execution Unification +- Reference: `src/bridge/initReplBridge.ts` +- AX apply location: `src/AxCopilot/Services/Agent/AxAgentExecutionEngine.cs`, `src/AxCopilot/Services/LlmService.cs` +- Completion criteria: + - prompt stack assembly, execution mode choice, and final assistant commit are engine-owned. + - send/regenerate/retry/queued follow-up/slash flows all call the same preparation API. +- Quality criteria: + - behavior is deterministic per tab/settings combination. + - UI stops building different prompt stacks for the same conversation state. + +### Phase C. AgentLoop Event Normalization +- Reference: `src/bridge/sessionRunner.ts`, `src/bridge/bridgeMessaging.ts` +- AX apply location: `src/AxCopilot/Services/Agent/AgentLoopService.cs`, `src/AxCopilot/Services/Agent/AgentLoopTransitions.cs`, `src/AxCopilot/Services/Agent/AgentLoopTransitions.Execution.cs` +- Completion criteria: + - loop events are normalized into bounded activity/event records before UI consumption. + - permission requests, failure states, retries, and completion states use a stable event shape. +- Quality criteria: + - Cowork/Code no longer flash rapidly during long-running tool sequences. + - file path/debug detail remains collapsed by default. + +### Phase D. Timeline Render Parity +- Reference: `src/screens/REPL.tsx`, `src/components/Messages.tsx` +- AX apply location: `src/AxCopilot/Views/ChatWindow.xaml`, `src/AxCopilot/Views/ChatWindow.xaml.cs` +- Completion criteria: + - assistant/user messages, execution logs, compact boundaries, and queue summaries are rendered from one derived timeline model. + - direct imperative bubble injection is removed from normal send/regenerate/retry flows. +- Quality criteria: + - no blank assistant cards. + - no token-only completion without visible content. + - no duplicate event banners after re-render. + +### Phase E. Composer and Status Strip Simplification +- Reference: `src/screens/REPL.tsx`, `src/components/StatusLine.tsx` +- AX apply location: `src/AxCopilot/Views/ChatWindow.xaml`, `src/AxCopilot/Views/ChatWindow.xaml.cs` +- Completion criteria: + - composer height grows only on explicit line breaks. + - status strip, queue summary, and runtime activity all use debounced runtime updates. + - Chat/Cowork/Code share one responsive width calculation policy. +- Quality criteria: + - resizing feels natural. + - composer does not keep growing after send. + - metadata remains subordinate to the message timeline. + +### Phase F. Recovery, Resume, and Verification +- Reference: `src/bootstrap/state.ts`, `src/bridge/sessionRunner.ts`, `src/screens/REPL.tsx` +- AX apply location: `src/AxCopilot/Views/ChatWindow.xaml.cs`, `src/AxCopilot/Services/Agent/AxAgentExecutionEngine.cs`, `src/AxCopilot/Services/ChatStorageService.cs` +- Completion criteria: + - reopen after interruption keeps queue, runtime summary, and latest visible assistant state consistent. + - retry-last and regenerate do not depend on mutating `InputBox.Text`. + - all three tabs pass reopen/retry/manual compact/manual stop/manual resume scenarios. +- Quality criteria: + - stored conversation and rendered conversation stay identical after restore. + - final reopened state matches the last completed runtime state. + ## Execution Tracks 1. Hook contract parity - Structured hook output support (`updatedInput`, `updatedPermissions`, `additionalContext`). @@ -28,3 +111,10 @@ - Internal parity scenarios pass target threshold. - Resume/replay failures: zero. - `dotnet build` warnings/errors: zero. + +## Validation Matrix +- Build: `dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify\\ -p:IntermediateOutputPath=obj\\verify\\` +- Manual scenario 1: Chat send -> answer visible -> retry -> regenerate -> reopen conversation +- Manual scenario 2: Cowork tool run -> progress summary -> completion -> queue next request -> reopen +- Manual scenario 3: Code task with execution log noise -> completion -> compact -> next turn -> reopen +- Manual scenario 4: AX Agent internal settings change -> immediate runtime reflection without layout regression