REFAC: Standardize on Cognitive Cycle and update documentation
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#+FILETAGS: :plan:ux:emacs:interface:psf:
|
||||
|
||||
* Phase A: Demand (Verify State)
|
||||
- Current state: The `org-agent` Emacs client uses a single buffer for both input and output, or a clunky side-window for reasoning. The interface is rudimentary and lacks modern chat application affordances.
|
||||
- Current state: The `opencortex` Emacs client uses a single buffer for both input and output, or a clunky side-window for reasoning. The interface is rudimentary and lacks modern chat application affordances.
|
||||
- User feedback indicates that responses and reasoning streams are sometimes missing or hard to read.
|
||||
- Objective: Design a comprehensive, intuitive, and modern UX for the Emacs client.
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
|
||||
** 1. Window Layout Management
|
||||
We will abandon the single-buffer approach and adopt a dual-window layout for the chat interface:
|
||||
- **`*org-agent-chat*` (Top, 80% height)**: A read-only `special-mode` or customized `org-mode` buffer dedicated to displaying the conversation history, agent responses, and tool execution logs.
|
||||
- **`*org-agent-input*` (Bottom, 20% height)**: A dedicated `markdown-mode` or `org-mode` buffer for composing messages. Pressing `C-c C-c` here will send the contents to the daemon, clear the input buffer, and append the user's message to the main chat buffer.
|
||||
- **`*opencortex-chat*` (Top, 80% height)**: A read-only `special-mode` or customized `org-mode` buffer dedicated to displaying the conversation history, agent responses, and tool execution logs.
|
||||
- **`*opencortex-input*` (Bottom, 20% height)**: A dedicated `markdown-mode` or `org-mode` buffer for composing messages. Pressing `C-c C-c` here will send the contents to the daemon, clear the input buffer, and append the user's message to the main chat buffer.
|
||||
|
||||
** 2. The Output Formatting Engine (Syntax & Color)
|
||||
To make the main chat buffer appealing, we need a robust formatting engine within `org-agent.el`:
|
||||
To make the main chat buffer appealing, we need a robust formatting engine within `opencortex.el`:
|
||||
- **Structured Insertion**: When the daemon sends an `:insert-at-end` command, the Emacs client will parse the payload.
|
||||
- **Font-Lock Extensions**: We will define custom `font-lock` rules for the `*org-agent-chat*` buffer to highlight specific elements:
|
||||
- **Font-Lock Extensions**: We will define custom `font-lock` rules for the `*opencortex-chat*` buffer to highlight specific elements:
|
||||
- *User Messages*: Distinct background or font face.
|
||||
- *Agent Responses*: Standard Org-mode styling.
|
||||
- *Tool Executions (Reasoning)*: Dimmed or italicized text for "Thinking..." or "Executing shell command: `ls`".
|
||||
@@ -37,11 +37,11 @@ To handle code modifications safely and beautifully:
|
||||
- *Interactive Acceptance*: The user can press a key (e.g., `C-c C-y`) on the diff to accept and apply the patch, realizing the "Active Approval Mode" pattern in Emacs.
|
||||
|
||||
** 4. The Reasoning Stream Integration
|
||||
- Instead of a separate right-side window that clutters the workspace, the reasoning stream (Probabilistic Engine thoughts, tool calls) will be integrated directly into the main `*org-agent-chat*` buffer.
|
||||
- Instead of a separate right-side window that clutters the workspace, the reasoning stream (Probabilistic Engine thoughts, tool calls) will be integrated directly into the main `*opencortex-chat*` buffer.
|
||||
- It will be presented as a collapsible Org-mode drawer (e.g., `:REASONING:`) or formatted as dimmed, transient text that provides transparency without overwhelming the primary conversation.
|
||||
|
||||
* Phase C: Tester (Verification Strategy)
|
||||
- Launch `M-x org-agent`.
|
||||
- Launch `M-x opencortex`.
|
||||
- Verify the dual-window layout appears correctly.
|
||||
- Type a message in the input buffer, send it, and verify it clears and appears in the main buffer.
|
||||
- Trigger a tool call and verify the reasoning stream is formatted clearly (and distinct from the final answer).
|
||||
@@ -49,5 +49,5 @@ To handle code modifications safely and beautifully:
|
||||
|
||||
* Migration Strategy
|
||||
This overhaul requires significant changes to:
|
||||
1. `projects/org-agent/src/org-agent.el` (The Emacs client).
|
||||
1. `projects/opencortex/src/opencortex.el` (The Emacs client).
|
||||
2. `notes/org-skill-chat.org` (To update the expected payload formats if we move beyond simple `:insert-at-end`).
|
||||
|
||||
Reference in New Issue
Block a user