Skip to content

feat: add in-session workflow nudges#150

Merged
ccf merged 2 commits intomainfrom
feat/in-session-workflow-nudges
Mar 26, 2026
Merged

feat: add in-session workflow nudges#150
ccf merged 2 commits intomainfrom
feat/in-session-workflow-nudges

Conversation

@ccf
Copy link
Owner

@ccf ccf commented Mar 26, 2026

Summary

  • add sidecar-first in-session workflow nudges that combine live session signals with session-start coaching
  • expose a new MCP tool for actionable nudges during an active local session
  • mark the roadmap item for in-session workflow nudges shipped

Testing

  • PYTHONPATH=src pytest tests/test_nudges.py tests/test_mcp_tools.py tests/test_mcp_server.py -q
  • ruff check src/primer/common/schemas.py src/primer/mcp/nudges.py src/primer/mcp/tools.py src/primer/mcp/server.py tests/test_nudges.py tests/test_mcp_tools.py tests/test_mcp_server.py
  • ruff format --check src/primer/common/schemas.py src/primer/mcp/nudges.py src/primer/mcp/tools.py src/primer/mcp/server.py tests/test_nudges.py tests/test_mcp_tools.py tests/test_mcp_server.py

Note

Medium Risk
Introduces a new sidecar-facing MCP tool that combines local live-session signals with a server-fetched coaching brief; behavior depends on signal mapping logic and tolerating invalid/failed coaching responses.

Overview
Adds in-session workflow nudges to the Primer sidecar: new Pydantic schemas (InSessionNudge, InSessionNudgesResponse) and a build_in_session_nudges mapper that turns specific live signal types into prioritized, action-oriented suggestions (with a low-risk “stay the course” fallback).

Exposes this via a new MCP tool in_session_nudges (and primer_in_session_nudges) that pulls local live-session signals, optionally fetches the session-start coaching brief from the server, and renders a markdown nudge report; invalid coaching payloads or request errors are handled by falling back to nudges built from live signals only.

Marks the roadmap item for in-session workflow nudges as shipped and adds focused tests for the new nudge builder and MCP wiring.

Written by Cursor Bugbot for commit 2375fe6. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the spend limit has been reached. To enable Bugbot Autofix, raise your spend limit in the Cursor dashboard.

@ccf ccf merged commit 28758e4 into main Mar 26, 2026
6 checks passed
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