Hands-on with Kimi Code · Challenge 03 · 中文版

Lesson 3: The bounded change, one contract line at a time

Checkpoint l0310 ptsgated by test suiteKimi Code CLI

Drive the starter to green through the coder lane in bounded steps — and review every edit before the next one lands.

Six agent-tool courses share this challenge. Kimi Code CLI-specific steps are still being written — until they land and pass review, this page defers its canonical to the primary course's copy.

Doing this with your agent? One sentence starts the whole course:

Read https://flypython.com/skills/flypython/SKILL.md and start the FlyPython course `hands-on-with-kimi-code`.

Lesson 3: The bounded change, one contract line at a time

Objective

The starter passes all nine tests through a sequence of bounded changes, and you can explain every edit without reading the solution first.

Why this lesson exists

This is the lesson people skip — and the one that builds the actual skill. Letting an agent rewrite the file in one shot teaches you nothing and leaves you a change you cannot honestly review. Supervising small edits, each pinned to a contract line, is how the code stays yours. Kimi Code’s lane split helps: explore and plan cannot touch files at all — every edit funnels through coder, the one lane you watch.

The lesson

With the plan from Lesson 2 in hand, tell kimi:

“Execute the plan against starter/report_tool.py with the coder subagent. One failing test group at a time: JSON loading, then validation isolation, then rounding, then atomic writes, then the end-to-end tests. After each group, run python verify.py starter and show me the edit before continuing.”

Hold it to the contract’s boundaries:

  • Only starter/report_tool.py changes. If an edit touches tests/, solution/, or scenario/, stop and ask why.
  • No new imports outside the standard library.
  • Each change should move toward one contract line. Reject drive-by refactors (“while I was here I renamed…”).
  • If the agent wants to change a test, the answer is no. Tests are the contract; the code moves.

Review deliberately between steps. Read the actual edit, not just the agent’s summary of it — when the two disagree, the diff is the truth. A change you cannot explain is a change you do not keep; roll it back and re-dispatch the step with a tighter instruction.

Expect the failing count to drop group by group: 7 → 5 → 4 → 3 → 2 → 0.

Exercise

Pick one edit coder made — ideally the validation-isolation change — and explain it back: “line N does X; that satisfies contract line Y.” If you cannot, ask for a walkthrough of that edit before the next step runs.

Checkpoint

Run python verify.py. This checkpoint’s code appears only when the starter suite is green. You pass the lesson when you can answer:

  1. How many steps did the bounded change take, and what made each step bounded?
  2. Which edit did you reject or re-dispatch, and why?
  3. Point at the edit that implements “isolate invalid rows with reasons” — where is it?

Expected evidence

A green python verify.py starter run, and your edit-by-edit explanation of the change that earned it.

Hints

Stuck? Open one at a time.

Hint 1 — What this checkpoint tests

That the starter passes all nine tests through changes you supervised — python verify.py shows this code only once the starter suite is green.

Hint 2 — Coder is the only lane that edits

Only the coder subagent can write files and run commands — which means every change funnels through one lane you can watch. Keep each step to one contract line and verify between steps.

Hint 3 — When you are done

Every edit maps to a contract line, and you can explain each one without opening solution/.

Submit

Done? Record it.

The 8-character code verify.py progress printed for this checkpoint — from the browser, or straight from your agent.

Youbrowser

Submit the claim code

Your agentauto-submit

Let the agent solve and submit

Hand it this checkpoint (copy button on hover) — it solves, verifies, and submits on its own:

Work on the FlyPython challenge "Hands-on with Kimi Code" (course id course-kimi-code), checkpoint l03.
Machine-readable brief: https://flypython.com/api/challenges/hands-on-with-kimi-code
Open the course folder and read TASK.md first — it is the contract.
Rules: smallest change, no new dependencies, never edit tests/ or solution/.
Check with python verify.py until its gates pass, then report each claim code to me.
Target: solve only checkpoint l03, and submit it as soon as it passes.

With a token from your agent page (env FLYPYTHON_TOKEN), it records the result directly:

curl -X POST https://flypython.com/api/claims \
  -H "Authorization: Bearer $FLYPYTHON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"claims":[{"course":"hands-on-with-kimi-code","checkpoint":"l03","code":"<8-char code>"}]}'

Or install the full FlyPython agent skill once and skip the paste.

Files

The starter and verifier

Solving runs on your machine — your agent fetches the course files itself via /api/challenges/hands-on-with-kimi-code/files; you download nothing by hand. Prefer reading the source? Browse the folder on GitHub ↗