Skip to content

feat: agent-powered watchlist builder with embedded chat and proposals#6

Merged
atomize merged 5 commits into
developfrom
feature/watchlist-agent-builder
Mar 31, 2026
Merged

feat: agent-powered watchlist builder with embedded chat and proposals#6
atomize merged 5 commits into
developfrom
feature/watchlist-agent-builder

Conversation

@atomize

@atomize atomize commented Mar 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Embedded agent chat in Watchlist Builder: The builder tab now has a dedicated AI chat panel (right column) instead of the generic floating popover. The chat sends with context='watchlist_builder' so the server knows to use the specialized watchlist-building system prompt.
  • Structured watchlist proposals: When the agent recommends a watchlist (e.g. "build me a quantum computing watchlist"), it outputs a structured JSON block that gets parsed server-side and sent as a watchlist_proposal WS message. The client renders this as an interactive ProposalCard with Accept/Edit/Dismiss actions.
  • Specialized system prompt: The watchlist chat handler has a detailed system prompt that teaches Claude how to structure sector watchlists (using the AI Supply Chain 7-layer model as the gold standard), includes the user's current watchlists as context, and instructs it to emit structured proposals.
  • Accept & Save / Load as Draft: "Accept & Save" creates the proposed watchlist and saves all items in one click. "Load as Draft" loads the proposal into the editor so the user can tweak before saving.

Commits (5)

  1. feat(shared): WatchlistProposal schema + context-aware chat messages
  2. feat(monitor): watchlist-builder chat handler with proposal extraction
  3. feat(monitor): route watchlist_builder context to proposal handler
  4. feat(dashboard): watchlist proposal state + context-aware sendChatMessage
  5. feat(dashboard): embedded agent chat in WatchlistBuilder with proposal cards

Test plan

  • Open Watchlist Builder tab, verify embedded chat panel appears on right
  • Type "build me a quantum computing watchlist" — verify agent responds with a proposal card
  • Click "Accept & Save" — verify new watchlist appears in sidebar with all items
  • Click "Load as Draft" — verify items load into editor as unsaved changes
  • Click "Dismiss" — verify proposal card disappears
  • Verify floating chat is hidden when on Watchlist Builder tab
  • Verify floating chat still works on other tabs
  • Type "add EUV lithography companies to my AI Supply Chain list" — verify context-aware response

Made with Cursor

atomize added 5 commits March 31, 2026 13:42
…sages

- WatchlistProposalSchema: name, sector, layers, items, reasoning
- Add watchlist_proposal to WsMessageSchema for server → client proposals
- Add context and activeWatchlist fields to chat_send client message
  to differentiate watchlist builder chat from general chat

Made-with: Cursor
…ction

New handleWatchlistChat function with a specialized system prompt that
instructs Claude to output structured watchlist proposals as JSON blocks.
The response is parsed to extract proposals (name, layers, items with
tickers/descriptions/thesis/strategies) separately from the display text.
System prompt uses AI Supply Chain as the gold-standard example.

Made-with: Cursor
When chat_send includes context='watchlist_builder', routes to
handleWatchlistChat instead of generic chat. Sends both chat_message
and watchlist_proposal WS messages back to the client.

Made-with: Cursor
- Add WatchlistProposal state and watchlist_proposal message handler
- sendChatMessage now accepts context and activeWatchlist parameters
- Add clearProposal action for dismissing proposals

Made-with: Cursor
…l cards

- WatchlistBuilder now has a 3-column layout: sidebar, editor, embedded chat
- Agent chat sends with context='watchlist_builder' and active watchlist name
- ProposalCard component renders agent-proposed watchlists with ticker table,
  layers preview, and Accept/Edit/Dismiss actions
- "Accept & Save" creates the watchlist and saves items in one action
- "Load as Draft" loads proposal items into the editor for manual tweaking
- Floating chat hidden when on the watchlist builder tab (chat is embedded)
- Export WatchlistProposal from shared package index

Made-with: Cursor
@atomize
atomize merged commit 4ee20a2 into develop Mar 31, 2026
1 check passed
@atomize
atomize deleted the feature/watchlist-agent-builder branch March 31, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant