@ramarivera/pi-goal
Pi extension that adds Codex-style persisted goals and hidden continuation pressure.
Package details
Install @ramarivera/pi-goal from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@ramarivera/pi-goal- Package
@ramarivera/pi-goal- Version
0.1.4- Published
- May 5, 2026
- Downloads
- 509/mo · 509/wk
- Author
- ramarivera
- License
- MIT
- Types
- extension, skill
- Size
- 76.9 KB
- Dependencies
- 1 dependency · 2 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
],
"skills": [
"./skills"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@ramarivera/pi-goal
Pi extension that adds Codex-style persisted goals, /goal commands, model goal tools, and hidden continuation pressure.
Install
After the package is published:
pi package install @ramarivera/pi-goal
The publishable extension source is:
src/index.ts
For local development, Pi discovers the project-local shim from:
.pi/extensions/pi-goal/index.ts
That shim imports the real source entrypoint and is intentionally not part of the package payload.
To avoid collisions when the published package is also installed globally, the project-local shim registers /local-goal and local_get_goal / local_create_goal / local_update_goal.
Commands
/goal <objective>
/goal <objective> --budget 10000
/goal status
/goal pause
/goal resume
/goal clear
Creating a goal also submits the objective as the next user message after the goal state is persisted, so the agent starts working on it immediately.
When developing from this repository with the global package installed, use the local command names:
/local-goal <objective>
/local-goal <objective> --budget 10000
/local-goal status
/local-goal pause
/local-goal resume
/local-goal clear
See docs/pi-goal-extension.md for behavior and test details.
Skill
This package also ships a goal skill under skills/goal/SKILL.md that helps Pi recognize when a persisted-goal workflow is appropriate and guides users toward effective objective writing, budget control, and completion auditing.
The skill covers:
- When to use
/goalvs regular chat - How to write specific, verifiable objectives
- Understanding the completion audit
- Budget guidance and lifecycle behavior
- Examples: migration campaigns, test coverage, lint sweeps
Tracing
pi-goal writes structured Pino JSON logs for goal state changes, /goal commands, model tools, lifecycle hooks, hidden continuation scheduling, context pruning, token accounting, and suppression decisions.
Default log file:
~/.pi/logs/pi-goal.log
Environment variables:
PI_GOAL_LOG_LEVEL=debug
PI_GOAL_LOG_FILE=/tmp/pi-goal.log
PI_GOAL_LOG_FILE=stdout
PI_GOAL_LOG=0
Logs intentionally include goal ids, statuses, counters, usage, and scheduling reasons, but not full continuation prompts or objective text.