Core product journey: solve a coding exercise with an AI interviewer

Working draft · October 21, 2026 · A logged-in learner works through an exercise, collaborates with Nyjah, writes code, and runs it.

Journey overview

Each section below represents a product page/state in the learner’s end-to-end experience. The wireframes establish information hierarchy and interaction intent, not final visual design.

1. Start2. Prompt3. Clarify4. Write5. Run6. Read output7. Iterate8. Agent observes
01

Start an exercise

The learner selects or resumes an exercise and enters the coding workspace.

train.online/exercises
trainonlineDM

Your exercises

Choose an exercise to continue learning.

Find the first duplicatePython · Started today · 42% completeResume
Build a word counterTypeScript · Not startedStart
02

Receive the coding question

On entering the workspace, the agent introduces the problem and frames the expected outcome.

train.online/exercises/first-duplicate
trainonlineDM
main.pymain.ts
Python
1# Write your solution here
2
Saved▶ Run
03

Ask a clarifying question

The learner resolves ambiguity without leaving the exercise context.

train.online/exercises/first-duplicate
trainonlineDM
main.pymain.ts
Python
1# Write your solution here
Saved▶ Run
04

Write code in the codepad

The learner switches focus to the editor while the conversation remains available for support.

train.online/exercises/first-duplicate
trainonlineDM
main.pymain.ts
Python
1def first_duplicate(numbers):
2 seen = set()
3 for number in numbers:
4 if number in seen:
5 return number
6 seen.add(number)
7 return None
Saving…▶ Run
05

Run the program

The learner explicitly runs the current saved snapshot. A terminal drawer rises from the bottom of the code side only; Nyjah’s chat stays visible and unchanged.

train.online/exercises/first-duplicate
trainonlineDM
main.pymain.ts
Python
1def first_duplicate(numbers):
2 seen = set()
3 for number in numbers:
● Running▶ Run
$ python main.py

Starting isolated run…
Running main.py
Clear outputStop run
06

See stdout in the pseudo terminal

The learner evaluates stdout in the open code-side drawer and can return to editing without losing the conversation.

train.online/exercises/first-duplicate
trainonlineDM
main.pymain.ts
Python
1def first_duplicate(numbers):
2 seen = set()
3 for number in numbers:
✓ Finished▶ Run
$ python main.py

Input: [2, 1, 3, 1, 2]
First duplicate: 1

Process finished with exit code 0
$
Clear outputClose drawer
07

Change the code and iterate

The learner returns to the codepad, adapts the solution, and runs another isolated snapshot.

train.online/exercises/first-duplicate
trainonlineDM
main.py ●main.ts
Python
1def first_duplicate(numbers):
2 seen = set()
3 for number in numbers:
4 if number in seen:
5 return number
6 seen.add(number)
7 return None # handles no duplicate
Saved just now▶ Run
08

Agent observes code and run results

Nyjah has explicit, scoped access to the current code and execution transcript. Its activity appears only as a chat update; the code panel never changes state because Nyjah is working.

train.online/exercises/first-duplicate
trainonlineDM
main.pymain.ts
Python
1def first_duplicate(numbers):
2 seen = set()
3 for number in numbers:
4 if number in seen:
5 return number
6 seen.add(number)
7 return None
Saved just now▶ Run

Open questions to resolve

  1. Exercise entry: Is an exercise selected from a library, assigned through a curriculum, created by the learner, or any combination of these?
  2. Question format: Does the agent always author the exercise prompt live, or can it deliver a predefined prompt and tests?
  3. Agent initiative: May the agent proactively message the learner after edits/runs, or only reply after the learner asks?
  4. Codepad scope: Does each exercise continue to have exactly main.py and main.ts, with one active language, or should an exercise be able to add files?
  5. Run inputs: How does a learner supply stdin or select test cases? Does the initial phase only support a fixed program run?
  6. Run history: Should learners see prior run transcripts, or only the most recent stdout/stderr?
  7. Agent context: Is the agent allowed to view every saved revision and run, or only the latest snapshot and latest run unless the learner explicitly shares more?
  8. Academic integrity: How much direct code may the agent provide before or after submission, and should that policy vary by exercise mode?

Working assumption: the browser speaks only to the API; code runs in isolated Modal Sandboxes; the agent reads code and run output through controlled worker tools. These align with the current architecture decisions and remain subject to product decisions above.