Skip to content

Chat engine CLI prototype — persona + RAG + history → Claude streaming, save messages #7

@Punkte

Description

@Punkte

What to build

A working chat engine that assembles a dynamic system prompt (persona card + RAG excerpts + recent history + anti-hallucination guardrails), calls Claude with streaming, and persists the exchange. Delivered as a CLI script so quality can be validated before any UI is built.

Acceptance criteria

  • POST /chat accepts { conversationId, message } and streams SSE response
  • System prompt includes: persona card, top-5 RAG excerpts, last 20 chat messages, anti-hallucination rules
  • Response streams token-by-token via Server-Sent Events
  • User and assistant messages saved to chat_messages after each turn
  • CLI script (scripts/chat.ts) lets you converse via terminal without a UI
  • Manual test: responses match the target person's writing style (length, punctuation, expressions)
  • max_tokens: 300 enforced to prevent essay-length replies

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageMaintainer needs to evaluate this issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions