Reasoning Chain Viewer Panel #18

Open
opened 2026-03-20 22:25:27 +00:00 by replit · 0 comments
Owner

What & Why

Visitors pay for Timmy to think on their behalf. Showing Timmy's actual reasoning — the internal steps and considerations before the final answer — is both valuable and philosophically aligned with the project's transparency ethos. Pulls back the curtain on the AI process.

Done looks like

  • Each completed job in the Workshop has a 'Show Timmy's reasoning' expandable section
  • Reasoning captured server-side during job execution: Timmy prompted to produce chain-of-thought before final answer
  • Chain-of-thought stored separately from the final answer in jobs table
  • Clicking 'Show reasoning' expands a styled panel showing numbered steps
  • Panel clearly distinguishes reasoning (internal) from the final answer (delivered)
  • Captured for all paid jobs; not shown for free chat

Out of scope

  • True extended thinking API support (use explicit CoT prompting if not available)
  • Editing or replaying reasoning
  • Showing reasoning during streaming (shown only after completion)

Tasks

  1. Chain-of-thought prompt — Update work model system prompt to produce a structured chain-of-thought before the final answer, delimited with clear markers for parsing.
  2. Reasoning extraction + storage — Parse reasoning section out of model response; store in reasoning_chain column on jobs table; deliver final answer without reasoning prefix to visitor.
  3. Reasoning API endpoint — Expose GET /api/jobs/:id/reasoning returning the reasoning chain for a completed job.
  4. Reasoning viewer UI — Expandable 'Show Timmy's reasoning' section for each completed job in Workshop chat; styled distinctly from the answer.

Relevant files

  • artifacts/api-server/src/lib/agent.ts
  • artifacts/api-server/src/routes/jobs.ts
  • the-matrix/js/ui.js
  • the-matrix/js/session.js
## What & Why Visitors pay for Timmy to think on their behalf. Showing Timmy's actual reasoning — the internal steps and considerations before the final answer — is both valuable and philosophically aligned with the project's transparency ethos. Pulls back the curtain on the AI process. ## Done looks like - Each completed job in the Workshop has a 'Show Timmy's reasoning' expandable section - Reasoning captured server-side during job execution: Timmy prompted to produce chain-of-thought before final answer - Chain-of-thought stored separately from the final answer in jobs table - Clicking 'Show reasoning' expands a styled panel showing numbered steps - Panel clearly distinguishes reasoning (internal) from the final answer (delivered) - Captured for all paid jobs; not shown for free chat ## Out of scope - True extended thinking API support (use explicit CoT prompting if not available) - Editing or replaying reasoning - Showing reasoning during streaming (shown only after completion) ## Tasks 1. **Chain-of-thought prompt** — Update work model system prompt to produce a structured chain-of-thought before the final answer, delimited with clear markers for parsing. 2. **Reasoning extraction + storage** — Parse reasoning section out of model response; store in `reasoning_chain` column on jobs table; deliver final answer without reasoning prefix to visitor. 3. **Reasoning API endpoint** — Expose GET `/api/jobs/:id/reasoning` returning the reasoning chain for a completed job. 4. **Reasoning viewer UI** — Expandable 'Show Timmy's reasoning' section for each completed job in Workshop chat; styled distinctly from the answer. ## Relevant files - `artifacts/api-server/src/lib/agent.ts` - `artifacts/api-server/src/routes/jobs.ts` - `the-matrix/js/ui.js` - `the-matrix/js/session.js`
replit added the aibackendworkshopfrontend labels 2026-03-20 22:25:27 +00:00
gemini was assigned by Rockachopa 2026-03-22 23:37:40 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: replit/timmy-tower#18