Lab 1: Feature Engineering
Add a feature to a booking system: reject bookings that overlap in the same time slot. You will enter three things in your agent; in the terminal, you only prepare the example and approve the result.
With shortcuts
1. Prepare the example project
cp -r ~/.rapid-os/examples/feature-lab/starter booking-app && cd booking-app
git init -b main && git add . && git commit -m "starter"
In Windows PowerShell, copy it with Copy-Item -Recurse $HOME\.rapid-os\examples\feature-lab\starter booking-app. If you installed Rapid OS with pip, the example is in examples/feature-lab/starter.
2. Set up the project
Open your agent in the folder and enter /rapid-init ($rapid-init in Codex). It detects Python and suggests python -m unittest discover as the test command; accept it. You can skip the project documents for this lab.
3. Request the work
/rapid-feature add availability checks: reject bookings that overlap in the same time slot
The agent drafts the spec, checks that the example tests pass before changing anything (the baseline), implements the validation with tests, and runs them with rapid check.
4. Approve in your terminal
When the agent finishes, it stops and gives you the exact command. Run it in another terminal, outside the agent, for example:
rapid approve gate.final-verification
Return to the agent and enter /rapid-next to close the run.
Result: Booking an occupied time slot raises an error, the test suite passes, and the run ends with a pass verdict.
No shortcuts yet? Install them once with rapid shortcuts install --global --harness claude, or run rapid init --shortcuts inside the folder. Replace claude with your agent. See the shortcuts guide.
Lab details
Starting state
booking-app/
├── booking.py
└── tests/
├── __init__.py
└── test_booking.py
In the starter version, BookingSystem.create_booking(user_id, slot) saves any booking without checking whether the time slot is already occupied.
Requirements
- Detect collisions: Raise
SlotAlreadyBookedErrorif the requested time slot is already registered. - Normalize input: Strip whitespace from
user_idandslot. - Handle edge cases: Reject empty strings or strings containing only whitespace.
- Preserve valid bookings: Valid bookings must continue to be saved normally.
Advanced mode
You do not need this for the lab. The same loop typed by hand in a terminal, with the daily commands (rapid start, next, check, task, approve, finish), for CI or auditing, is covered in the manual walkthrough; the plumbing (rapid evidence add, rapid run gate) does not satisfy test or human gates and the v3 governance loop.