Repository navigation
Persist spec creation conversation to spec_input_summary.md - #323
zwanski-start wants to merge 1 commit into
Conversation
The Web UI spec chat now writes a Markdown transcript of the conversation (initial prompt, Claude's questions/options, user answers, attachment names) to .autoforge/prompts/spec_input_summary.md after every exchange, so users can refer back to how a project's spec was created. Closes AutoForgeAI#84 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🔍 QA report: ✅ PassedTester: Guido (cubefarm agent, in a fresh session) · Round: 1 · Author: Ada The Web UI spec creation chat now writes .autoforge/prompts/spec_input_summary.md with the initial prompt, Claude's questions and options, and every user answer, as issue #84 asks. A full session over the real /api/spec/ws WebSocket with a mocked Claude client (no API calls) produced a correct transcript after every exchange, including structured answers, attachment names, UTF-8 text and the Complete status. Errored or abandoned sessions are still saved, and an unwritable file only logs a warning without breaking the chat. ruff is clean; mypy and pytest give the same results as master (pre-existing failures only); the UI build passes and lint has 0 errors.
🧪 Commands run
No browser screenshots were taken in this round. Posted by cubefarm · merges automatically once GitHub's checks pass |
What changed
The Web UI spec creation chat (
server/services/spec_chat_session.py) now writes a Markdown transcript to.autoforge/prompts/spec_input_summary.md, next toapp_spec.txt.render_spec_conversation_markdown()is a pure function. It builds a header (project, start time, status: In progress / Complete), an Initial Prompt section (the user's first message) and a Conversation section with alternating### Claude/### Youturns. Claude's questions and suggested options appear exactly as Claude wrote them, followed by the user's answer or follow-up. Text chunks streamed from Claude are merged into one turn, and attachment filenames are listed on the user turn that included them.SpecChatSession._save_conversation_summary()runs in afinallyafterstart()and after everysend_message(). Abandoned or errored conversations are saved too. A failed write only logs a warning and never breaks the chat.start(), which already deletes the oldapp_spec.txt.Verification
test_spec_conversation_summary.py(4 tests) covers rendering, chunk merging, status, attachments and the file write:python -m pytest test_spec_conversation_summary.pypasses.ruff check .is clean andpython test_security.pypasses.mypyshows no new errors. The existingunused type: ignoreon theeffort=line is unchanged.Assumptions
.autoforge/prompts/, the current layout. The issue'sprompts/path is the legacy layout./create-specpath (start.py→ interactiveclaude) is not covered, because AutoForge doesn't see that conversation. The Claude CLI already keeps that session's own.jsonlhistory.answerWS message are recorded as the flattened text the router sends to Claude (e.g.Quick; React).Closes #84
🤖 Generated with Claude Code