autocontext (skill repo)
Orchestration layer for evaluate → improve → persist agent outputs. Installed stack:
| Layer | Install | Role |
|---|---|---|
| Pi | npm:pi-autocontext in ~/.pi/agent/settings.json |
In-session tools + /skill:autocontext |
| CLI | uv tool install autocontext==0.5.0 → autoctx |
Background solve / run / list |
| Project | .autoctx.json in repo root |
Defaults: agent_task, provider: pi, gens: 2 |
When to use which skill
| Need | Use |
|---|---|
| PR diff review, OWASP, RN effects | zereight-review |
| Codebase pattern SSOT / drift | continuity |
| Chat mistake → durable rule | session-lessons |
| Rubric-driven loop, playbooks, scenario bench | autocontext |
| Pi-native solve loop + knowledge persistence | harness (faster, no Python dep) |
Pi tools (after pi install npm:pi-autocontext)
autocontext_judge— score output vs rubric (0–1 + reasoning)autocontext_improve— judge-guided revision roundsautocontext_status— runs / queueautocontext_scenarios— list scenariosautocontext_queue— background evaluationautocontext_runtime_snapshot— artifacts, session lineage
Invoke packaged skill: /skill:autocontext (from pi-autocontext package).
CLI (from repo root)
cd /path/to/skill # this repo
export AUTOCONTEXT_AGENT_PROVIDER=pi
export AUTOCONTEXT_PI_COMMAND=pi
autoctx list
# TypeScript CLI (Pi npm): ~/.pi/agent/npm/node_modules/.bin/autoctx capabilities
# Full loop (costs Pi/Cursor quota — start small)
autoctx solve "Improve zereight-review checklist consistency for RN PRs" --iterations 2
Artifacts: runs/, knowledge/ (gitignored). DB default: runs/autocontext.sqlite3.
First scenario for this repo
Goal: Make zereight-review feedback more consistent on sample PR diffs.
- Rubric: actionable findings, Effect anti-patterns, security mention when relevant, no vague praise-only comments.
- Judge:
autocontext_judgewith task = review prompt + diff snippet, output = draft review. - Improve: Hints that pass judge →
zereight-review/references/or checklist (human approves merge). - Stop:
gens: 2in.autoctx.json; raise only after reviewingruns/*/report.md.
Cost and safety
provider: piuses your Pi default (cursor/composer-2.5) — each generation consumes quota.- Start with
--iterations 1orautocontext_judgeonly before fullsolve. - Do not install npm package
autocontext(wrong project). Usepi-autocontext/ PyPIautocontext/ npmautoctx.
Env reference
Copy autocontext.env.example and export in shell or Pi session. Key vars:
AUTOCONTEXT_AGENT_PROVIDER=piAUTOCONTEXT_PI_COMMAND=piAUTOCONTEXT_DB_PATH=runs/autocontext.sqlite3AUTOCONTEXT_DEFAULT_GENERATIONS=2