@lessons/pi

Pi extension adapter for Lessons Markdown project knowledge

Packages

Package details

extension

Install @lessons/pi from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@lessons/pi
Package
@lessons/pi
Version
0.1.4
Published
Jul 22, 2026
Downloads
243/mo · 20/wk
Author
shizhelee
License
MIT
Types
extension
Size
45.8 KB
Dependencies
1 dependency · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./dist/index.js"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@lessons/pi

Pi coding-agent extension for Lessons: inject project Markdown context, observe task Episodes from host tool events, and Capture Lesson-first Memories into the project store.

Requires @earendil-works/pi-coding-agent@0.81.0 and @lessons/core.

Status: early preview host adapter on npm. Shares compose / seed / Quiet Capture with @lessons/core. OpenCode remains the primary dogfood path (installer + host smoke); Pi is a supported second host.

Install

pi install npm:@lessons/pi

Then restart Pi (or /reload). Check with pi list.

Project-local install (writes .pi/settings.json):

pi install -l npm:@lessons/pi

Try without installing:

pi -e npm:@lessons/pi

Local monorepo dogfood

pnpm build
pi install ./packages/pi
# or: pi -e ./packages/pi/dist/index.js

Exports

import LessonsPiPlugin from "@lessons/pi"
// or: import { LessonsPiPlugin } from "@lessons/pi"

Behavior

Hook / surface Behavior
before_agent_start Quiet Capture soft-close of previous episode → start → compose inject into systemPrompt
tool execution Observe file changes + structured exit-code verification only
message_end / agent_end Keep assistant prose for soft-close recovery
session_shutdown Soft-close remaining episode
/lessons-seed Brief ADR-003 CONTEXT seed (not Memories)
/lessons-status Episode / Memory / Last Capture notify

Tools

Tool Purpose
lessons_finish_episode After file change + task-shaped verification, Capture one verified Memory
lessons_status Active Episodes, verified Memories, Last Capture
lessons_context_status CONTEXT / AGENTS / ADR / memories presence
lessons_seed_project_context ADR-003 narrative CONTEXT seed

Capture still requires file change + verification + an L2 Lesson. Chat-only claims and soft-close template summaries are never stored.

License: MIT.