valentyn-vb / valentyn-vb/Recap-Project-6

AI-powered "Suggest Next Steps" action for Goals

Open
#4 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Learning Companion - AI-powered suggest next steps

Tasks
  • Add a "Suggest next steps" action on the goal detail page.
  • Send the goal (title, description, status) plus its past LearningSessions to the OpenAI Chat Completions API.
  • Prompt for 2-3 concrete, actionable next learning steps.
  • Render the reply as a short list on the goal detail page.
  • Reuse the existing OpenAI API key configuration from the "Generate summary" ticket (.env / application.properties / Rails credentials) — do not introduce a second config path.
Acceptance criteria
  • Clicking "Suggest next steps" on a goal with session history returns 2-3 concrete, relevant suggestions rendered as a list (not raw JSON or a single paragraph).
  • Works independently from the "Generate summary" action (doesn't require it to have been run first).
  • Handles a goal with no sessions yet (sensible suggestions or a clear empty-state message, no crash).
  • Handles OpenAI API errors gracefully (timeout, rate limit, invalid key) with a user-facing error message.
  • Tests cover: request payload construction (goal + sessions correctly gathered and scoped to current user), response parsing into a list, and graceful handling of API failure (mock the OpenAI call — do not hit the real API in tests).
Notes for agent
  • This depends on Goals/Sessions (#3) for the data, and assumes the OpenAI client/config set up in the "Generate summary" ticket (#5) already exists — reuse it, don't duplicate.
  • Mock/stub the OpenAI API call in tests — do not make real API calls during the test suite.
  • Parse the model's reply into a list structure before rendering (e.g. split on numbered lines) rather than dumping raw text.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the goal detail page and the existing “Generate summary” OpenAI client/config, reusing the path in .env, application.properties, or Rails credentials. Trace Goals and LearningSessions to ensure data is gathered for the current user, then add mocked tests for payload construction, response-list parsing, and API failures. Done means the action handles session history, empty sessions, and errors without real API calls.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
ai, backend, frontend, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.