Add a feature to an existing app: a room calendar
Real work is mostly adding features to code someone else wrote. Explore the course app with a coding agent until you understand it, then add a week calendar for each room: the right week, clear statuses, and privacy for members. Build it in small, checked steps, then write tests for what you built and review the tests your agent wrote.
Why this quest
Most work in software is not a new project. It is adding a feature to an app that other people wrote, that already works, and that real users depend on. A good developer does not start by writing code. They first learn how the app works: what it does, how the code is organised, what they can reuse, and how it is tested. Then they build in small steps, and they check that nothing else broke.
Coding agents make this faster, but only if you direct them well. An agent that has not explored the app writes new code next to old code that already does the job, ignores the app's rules, and breaks things it did not read. In this quest you practise the whole loop: explore, build, then test.
Your starting point
Your starter kit is the course app: the Lumo Community Centre, a Django app where members book
rooms and ask for help, staff handle requests, and managers approve large bookings. You did not
write it. Its README.md explains how to run it.
1. Explore the app (about 30 to 45 minutes)
Set it up and use it before you change anything:
pip install -r requirements.txt
python manage.py migrate
python manage.py seed_demo
python manage.py runserver
Open http://127.0.0.1:8000/. Every demo user has the same password: lumo-demo-2026.
| Username | Role |
|---|---|
amina, diego, priya (and others) |
member |
ravi, lucia |
staff |
grace |
manager |
Try these, in this order:
- Log in as
amina. Book the Main Hall for next week. Notice that it waits for approval. - Log out, and log in as
grace(the manager). Approve Amina's booking. - Open a room's page (Rooms, then a room). Look at the day view and its previous and next
day links. Look at it as a member, and as
ravi(staff). What is different?
Then open the project with your coding agent. Ask it to explain the codebase: the models, the
service layer in hub/services.py, the views, the templates and the tests. Ask follow-up
questions, and check its answers in the code. Then ask it to help you write an AGENTS.md
for this app (the stack, how to run and test it, where the rules live, and your rules for the
agent). Read and edit it yourself. Keep it short.
2. Notice what is missing
A room's page shows one day at a time. To see a room's week, or to find a free time, you click day by day. Staff who plan the week, and members who look for a free slot, cannot see the week at a glance.
3. The feature: a week calendar for each room
Add a page that shows one room's week as a calendar.
What it does:
- It shows the 7 days of one week, Monday to Sunday, each with its date, and the room's opening hours.
- Each booking appears on its day, spanning its time (a 10:00 to 12:00 booking is twice as tall, or as long, as a one-hour booking).
- Bookings waiting for approval look different from confirmed ones. Say it in words (for
example "waiting for approval") or with a CSS class (for example
requestedorpending) on the booking's element. - Cancelled and rejected bookings do not appear.
- Members see the details of their own bookings, and only "Busy" for other people's bookings: no name and no purpose, anywhere in the page. Staff and managers see who booked and why.
- Previous week and next week links.
- Days and times use the centre's time zone (
TIME_ZONE), like the rest of the app. - It is usable on a phone (try a narrow browser window).
The fixed details (the grader checks these, so keep them exactly):
- The URL is
/rooms/<id>/calendar/. It needs a login. An unknown room gives 404. - An optional
?week=YYYY-MM-DDchooses the week: any day of that week. Without it, the page shows the current week. A malformed value must not crash the page: show the current week, or answer 400. - Every booking the user may see in detail is an element with
data-booking-id="<id>", for example<li data-booking-id="42">. ("Busy" bookings may leave it out.) - The room's page (
/rooms/<id>/) links to the room's calendar.
Everything else is your choice: how it looks, the code, the names. Nice to have (not graded): clicking a free time opens the booking form for that room and time.
4. Build it with your agent
- Plan first. Ask the agent for a plan before any code. Does the plan reuse what the app already has? Does it follow the app's conventions? Change the plan if it does not.
- Small steps. One step at a time. After each step: read the diff, run the tests
(
python manage.py test), and look at the page in the browser as a member and as staff. - Commit after each step that works, so you can go back.
- If the agent goes in circles, stop it, and tell it what you learned.
5. Then write tests
When the calendar works, write tests for it in the app's test suite (for example
hub/tests/test_calendar.py): at least 3, and more if they check different rules. Good
tests check the rules above: the right week, cancelled bookings hidden, what a member may see.
Use the app's own tests (hub/tests/test_views.py) as examples.
If the agent writes tests, review them: Does each test check something that matters? Would it fail if the feature were broken? Try it: break the feature on purpose (for example, show cancelled bookings) and run the tests. Keep the good tests, fix or delete the others.
6. Take a screenshot
Take one screenshot of your calendar showing a week with some bookings (after seed_demo,
the current and next weeks have bookings). Log in as staff or the manager. Save it as
screenshots/calendar.png (or .jpg). A mentor may look at it.
What to submit
With neugen submit, from your quest folder:
- the app with your calendar and your tests;
- your
AGENTS.md(orCLAUDE.md/GEMINI.md); screenshots/calendar.png(or.jpg);- optionally, agent transcripts in
.neugen/logs/(neugen log <file>; see quest A2). They are not required and leaving them out never lowers your score. Remove any secrets first; SUBMISSION.md, short (the starter kit has a template): 1. What I learned exploring the app 2. What I asked the agent and how I checked it 3. How I tested
How you're graded
- Hidden tests run your app in a sandbox with a fresh database and other data: - Calendar (all must pass): the right week, the 7 days, the room's bookings of that week and no others, no cancelled or rejected bookings, waiting bookings marked. - Login and privacy (all must pass): members never see other people's names or purposes. - Navigation and bad input (all must pass): week links, the link from the room's page, 404, no crash. - No regressions (all must pass): the app's original tests still pass. The grader uses its own copy, so changing them does not help. - Stack checks: still Django and SQLite, no frontend framework or build step. - Your own tests: at least 3 new tests, all passing. - Files: your instruction file, and the screenshot.
- Rubric review by an AI grader: how you explored and understood the app, how you worked with the agent and reviewed its code and tests, and the result (your screenshot and write-up).
- Defense: a short conversation about your calendar and how you explored the app.
neugen test runs the public tests. eval/calendar_contract.py explains exactly how the tests
read your page (for example, which date formats count).
This is an AI-on quest. The tutor explains and gives hints, but it will not write the feature or the tests for you.
Suggested path (about 5 hours)
- Read the two required materials (30 minutes).
- Explore the app and write
AGENTS.md(60 minutes). - Build the calendar in small steps (2 hours).
- Write and review tests (45 minutes).
- Screenshot,
neugen test,SUBMISSION.md, submit (30 minutes).
Tips
- Look before you build. Something in
hub/services.pyalready knows what is booked in a room on a day, and who may see which details. Find it before your agent writes a new query. - Privacy is not a template trick. If a member's page never receives other people's names, it cannot show them by mistake.
- Run the whole test suite after each step. A broken old test is a real bug in your change.
- Test both sides of a rule: a booking that must appear, and one that must not.
Interface
GET /rooms/<id>/calendar/ # login required; unknown room -> 404
GET /rooms/<id>/calendar/?week=YYYY-MM-DD # any day of that week (Monday to Sunday)
# no ?week= -> the current week
# a bad ?week= -> the current week, or 400 (never 500)
<... data-booking-id="<booking id>"> # every booking the user may see in detail
"Busy" # other people's bookings, for members
/rooms/<id>/ links to /rooms/<id>/calendar/
# Keep: Django 5.2 only, SQLite, templates with plain JS/CSS, no frontend build.
# The course app's existing tests must still pass (the grader runs its own copy of them).
Read now
Read this first. Run the app and use it, guess which view handles a request, then check your guess. This is how to spend the first hour of this quest.
Read only 'The test client' (get, force_login, response.content) and assertContains / assertNotContains. Compare one test in hub/tests/test_views.py, then write a privacy test for the calendar.
Use while building
Open these when a step needs them. No need to read them first.
'Returning errors' with Http404, when you handle a missing room. Compare it with the _or_404 helper in hub/views.py.
'Grid tracks' (the fr unit and repeat()) and 'Grid lines' when you lay out the days. Useful to read and judge the CSS your agent writes.
Three stages. You only move on when the one before passes.
Automated gates
| Metric | Gate | What it checks |
|---|---|---|
| Calendar | ≥ 1.0 | Share of the calendar tests that pass: the right week (default and ?week=), the 7 days, this room's bookings of that week and no others, no cancelled or rejected bookings, waiting bookings marked, the centre's time zone. All must pass. |
| Login and privacy | ≥ 1.0 | Share of the privacy tests that pass: login required; members see their own bookings' details and only 'Busy' for other people's (no names, no purposes, anywhere in the HTML); staff and managers see details. All must pass. |
| Navigation and bad input | ≥ 1.0 | Share of the navigation tests that pass: previous and next week links, a link from the room's page, 404 for an unknown room, and no crash on a malformed ?week=. All must pass. |
| No regressions | ≥ 1.0 | Share of the course app's original tests (the grader's own copy) that still pass on your app. All must pass. |
| Stack checks | ≥ 1.0 | Still the course app on Django with SQLite, complete migrations, no frontend build or framework. All must pass. |
| Your own tests | ≥ 3 | How many new tests (not in the app's original test suite) Django finds in your project, counted only if all of them pass. You need at least 3. |
| Instruction file and screenshot | ≥ 1.0 | AGENTS.md (or CLAUDE.md / GEMINI.md) for this app, and a screenshot of your calendar in screenshots/ (PNG or JPEG, 10 KB to 8 MB). |
Gates run on the public set (which you have) and a hidden set with inputs you haven't seen.
Rubric review need ≥ 60%
The student used the app as different roles and asked the agent to explain it before any change, and checked its answers. The write-up names specific things they learned (e.g. room_schedule, the service layer, how privacy works) that match the code, and the AGENTS.md is short and specific to this app. Transcripts are optional: judge from the write-up and code when there are none.
A plan before code, small steps with tests run and diffs read, and concrete decisions: a correction (e.g. reuse instead of a new query, a privacy leak, a changed old test) or a check that confirmed the code was right. The student reviewed the agent's tests and kept, fixed or removed them for stated reasons; the tests named in the write-up exist and do what it says. Transcripts are optional: judge from the write-up, code and tests when there are none.
The write-up, templates and CSS show a clear, usable week calendar: seven dated days, bookings placed by time, waiting bookings easy to tell apart, a layout for narrow screens, checked by hand. (The AI grader reads text; a mentor may check the screenshot in screenshots/.)
Defense need ≥ 50%
A 4-question conversation with the AI examiner about your code. It isn't a trick: if you did it and understood it, it's the easy part. A weak defense on strong work gets you a new variant to redo.

