pi-autocontext
autocontext extension for Pi coding agent — iterative strategy generation, LLM judging, and evaluation tools
Package details
Install pi-autocontext from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-autocontext- Package
pi-autocontext- Version
0.12.0- Published
- Oct 26, 2026
- Downloads
- 511/mo · 48/wk
- Author
- jayscambler
- License
- MIT
- Types
- extension, skill, prompt
- Size
- 44.3 KB
- Dependencies
- 1 dependency · 4 peers
Pi manifest JSON
{
"skills": [
"./skills"
],
"prompts": [
"./prompts"
],
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-autocontext
autocontext extension for Pi coding agent — iterative strategy generation, LLM judging, and evaluation tools.
Install
pi install npm:pi-autocontext@0.12.0
Current package note: the pi-autocontext@0.12.0 source checkout is on a separate Pi extension line and depends on autoctx@^0.19.1. A follow-up Pi release can move it to a newer autoctx line after the core npm package is live.
Source checkouts require autoctx@^0.19.1 for the Zod collection-validation
security fix. The latest published Pi extension is currently 0.10.0 and uses
the older autoctx@^0.15.0 line. The 0.12.0 install command above requires a
separate Pi release; publishing autoctx 0.19.1 alone does not update that
extension. Until then, install this source checkout with
pi install /path/to/autocontext/pi.
Or add to your project's .pi/settings.json:
{
"packages": ["npm:pi-autocontext@0.12.0"]
}
What You Get
Tools
| Tool | Description |
|---|---|
autocontext_judge |
Evaluate agent output against a rubric using LLM-based judging |
autocontext_improve |
Run multi-round improvement loop with judge feedback |
autocontext_status |
Check status of autocontext runs and tasks |
autocontext_scenarios |
List available evaluation scenarios and families |
autocontext_queue |
Enqueue a task for background evaluation |
autocontext_runtime_snapshot |
Inspect run artifacts, package provenance, compaction ledger entries, session branch lineage, and recent events |
Skills
/skill:autocontext— Full instructions for using autocontext tools, running evaluations, and interpreting results
Prompt Templates
/autoctx-status— Quick project status check
Usage
Once installed, the tools are available to the LLM automatically. You can also invoke them directly:
> Evaluate the quality of this code against our coding standards rubric
> Run an improvement loop on this draft with max 5 rounds
> Show me the status of recent autocontext runs
> Inspect the runtime snapshot for run-123 and session sess-123
> List available evaluation scenarios
Or use the skill for guided workflows:
/skill:autocontext
Requirements
- Pi coding agent
- An LLM provider configured in Pi (Anthropic, OpenAI, etc.)
- Optional:
autoctxCLI for standalone usage outside Pi
Configuration
The extension auto-discovers your autocontext configuration:
- Provider: Uses Pi's configured LLM provider
- Database: Looks for
runs/autocontext.sqlite3orAUTOCONTEXT_DB_PATHenv var - Events: Reads
runs/events.ndjsonorAUTOCONTEXT_EVENT_STREAM_PATHfor recent runtime events - Scenarios: Discovers registered scenarios from the
autoctxpackage
Runtime compatibility checks
After npm ci --ignore-scripts, prepare better-sqlite3 and isolated-vm as for
the TypeScript CI jobs, then run:
npm run test:runtime-contract
For npm 12, package.json permits native build scripts only for the exact
reviewed versions of those two modules. CI builds them from source using the
headers supplied with its pinned Node setup; dependency installation still
uses --ignore-scripts.
This packs the extension and checks all six tools in a temporary fixture with
the installed dependency graph, its deterministic provider, and a temporary
SQLite database. It does not resolve new dependencies, use the Vitest runtime
alias, or mock autoctx; the normal npm test suite covers unit behavior.
Links
- autocontext — Main repository
- autoctx on npm — Core TypeScript package
- Pi coding agent — The Pi agent