I'm looking to build a learning extension for pi centered around project based learning.…
- User
I'm looking to build a learning extension for pi centered around project based learning.
This quote from Andrej Karpathy is a good north start for the type of learning experiences I'm looking to build
codeBuild Ramps To Knowledge, Not Syllabi Design courses as ramps: present the pain point first, then a minimal, motivated solution. Aim for high "Eureka per second" by ordering concepts so each depends only on prior material.I want to start with a very simple solution that I can dog food myself starting with very specific concepts and grow it from there
- Assistant
- User
Ok let's do it
- User
I added credits to my openrouter account, continue
- Assistant
Implemented the first project-based learning extension.
Added
extensions/learning/index.tsextensions/learning/README.md- Package registration in
package.json - Extension documentation in the root
README.md
Commands
text/learn <concept> /learn-status /learn-stop/learncollects your starting knowledge and timebox, then activates coaching based on:Need → Attempt → Friction → Minimum lesson → Application → Proof
State persists with the current session branch, and the active concept appears in pi’s footer.
Validation
- Loaded successfully with pi
0.84.2 - Extension module imports successfully
git diff --checkpasses- Reviewer findings around streaming, wizard cancellation, and invalid persisted state were addressed
Run:
text/reloadThen dogfood it with:
text/learn pi extension lifecycle and state - User
Start a project-based learning ramp for pi extension lifecycle and state.
My current understanding: Nothing Available time: about 20 minutes.
Propose 2–3 small project options as instructed by learning mode, then wait for me to choose.
- Assistant
Here are three projects sized for roughly 20 minutes:
1. Session visit counter
Visible outcome: A
/visitscommand reports how many times the current pi session runtime has started or reloaded.Why the concepts become necessary: An in-memory counter disappears during
/reload. Making it accurate requires observingsession_start, persisting state in session entries, and reconstructing it when the extension loads again.2. Lifecycle event monitor
Visible outcome: A footer indicator shows the latest lifecycle event, such as
session_start,agent_start, oragent_settled.Why the concepts become necessary: You must distinguish extension initialization from session and agent events, then decide which UI state should be recreated after reload.
3. Branch-aware learning checkpoint
Visible outcome:
/checkpoint <note>saves a note./checkpointdisplays the latest note on the current conversation branch.A global variable cannot represent different conversation branches correctly. You’ll need session entries and state reconstruction from .
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.