Source practice

This section turns the preceding knowledge into observable, verifiable tasks. Every exercise states its objective, required source reading, expected observations, completion criteria, verification method, and review questions.

Prerequisites

  • Complete at least the “One Turn” learning path.
  • Set up an isolated configuration by following Your first request with DeepSeek.
  • Know how to set a Python function breakpoint in your IDE.
  • Use a separate workspace and test Sessions for every experiment; never use important chat history.

Practice levels

DifficultyExerciseModify nanobot source?
1Trace a Tool-free TurnNo
1Trace a Tool Call and SessionNo
2Reproduce streaming, cancellation, and retryNo
2Write a Workspace SkillNo source change; writes to the lab workspace
3Build a read-only Tool pluginNo core change; installs an isolated plugin
4Capstone extension design reviewDesign first; implementation is optional

The learning loop

flowchart TD
    A["Write down a prediction"] --> B["Run or debug"]
    B --> C["Record real objects and state"]
    C --> D["Return to the source to explain differences"]
    D --> E["Reproduce with a test"]
    E --> F["Write a short retrospective"]
    F --> A

Prediction comes first. Single-stepping through thousands of lines without one often leaves only the impression that “I saw the code,” not a reusable mental model.

Shared experiment-note template

Create a note section like this for each exercise:

## My prediction
 
## Actual call chain
 
## Key object snapshots
 
## Differences from my prediction
 
## Source evidence
 
## Test evidence
 
## Still uncertain

“Still uncertain” is not a failure. It separates facts established by the code from questions that require another experiment.

Safety rules

  • Do not screenshot or copy API keys from a debugger’s variable view.
  • Do not use an important real workspace for write or cancellation experiments.
  • Do not test Tools that can cause external side effects such as payment, email, deletion, or publishing.
  • Put modification exercises in an isolated plugin or example directory.
  • Change only one variable at a time.
  • A smoke test against a real model does not replace deterministic tests.

Next: Trace a Tool-free Turn