Modern Dev Agent is a teaching-first MVP for programming assignments. It ingests markdown assignment material, turns it into structured task data, supports layered student tutoring, runs a pre-submit checklist, and gives teachers a risk-oriented dashboard powered by demo sessions and behavior events.
- Student assignment overview pages with task, deliverable, rubric, and risk summaries.
- Tutor sessions that escalate hints from direction to files, testing, and bounded implementation guidance.
- RAG-backed tutor context using a generated assignment/domain vector knowledge index.
- Deterministic tutor tool calls for knowledge search, student progress lookup, and submission readiness checks.
- Pre-submit checklist that checks writeup, README, testing notes, and reflection coverage.
- Teacher dashboard, assignment insight page, student portrait page, and intervention queue.
- Scripts for markdown ingestion and demo student or event seeding.
cp .env.example .env
pnpm install
pnpm ingest
pnpm rag:index
docker compose up llm-gateway --build
pnpm devOpen http://localhost:3000 and use the student or teacher entry points.
The Next.js app runs locally on the host. Only the FastAPI LLM gateway is containerized so model-side dependencies stay isolated.
- Copy
.env.exampleto.envand fill inOPENAI_API_KEYbefore starting the gateway. LLM_GATEWAY_URLshould stayhttp://127.0.0.1:8000when Next.js runs locally.LLM_GATEWAY_MODELcontrols the model name sent by/api/tutor.LLM_EMBEDDING_MODELcontrols the embedding model requested when building/querying the RAG index.RAG_TOP_KandRAG_MIN_SCOREtune vector retrieval breadth and score cutoff.OPENAI_BASE_URL,OPENAI_MODEL, andOPENAI_EMBEDDING_MODELpoint the FastAPI gateway at an OpenAI-compatible provider; chat uses/chat/completionsand embeddings use/embeddings.OPENCODE_VERSIONcontrols the opencode-styleUser-Agentused by the gateway's upstream model requests.INTERNAL_API_TOKENandLLM_GATEWAY_TOKENmust match.
pnpm devstarts the Next.js app.pnpm buildbuilds the production app.pnpm testruns the unit test suite.pnpm sync:contentrebuilds the normalized app-facing markdown from the officialassignments/week1-4materials.pnpm ingestsyncs the official week 1-4 assignments intocontent/source/Assignmentsand regenerates the imported database.pnpm rag:indexbuildscontent/imported/vector-knowledge.jsonfrom imported assignments.pnpm rag:rebuildruns ingest and then rebuilds the vector knowledge index.pnpm seed:studentsrefreshes demo students, sessions, and derived insights.pnpm seed:eventsrefreshes the simulated event log.
src/appcontains the pages and route handlers.src/lib/agentscontains the assignment parser, tutor, checklist, and teacher insight logic.src/lib/analyticscontains risk scoring and aggregation helpers.src/lib/contentholds the migration logic that normalizes the official course assignments for the app.src/lib/ragholds vector index building, local fallback embeddings, and retrieval helpers.content/sourceholds the generated markdown assignments used by the ingest pipeline.assignmentsstores the official raw course materials; weeks 1-4 are the current migration source.content/importedstores the generated local data snapshot.
- The runtime persistence layer is a local JSON store so the MVP can run without database setup friction.
prisma/schema.prismais included as a forward-compatible schema blueprint for migrating the MVP to SQLite via Prisma later.