@fan92rus/pi-goal-x

中文文档
0.36.1-fan.1发布于 2026/10/28MITES Module零依赖构建来源已验证近 30 天下载 2881

Adds /goal to pi: conversational goal planning, flexible or ordered goals, persistent progress, and an independent completion auditor.

原始使用文档
文档目录9 节
  1. Install
  2. Create a goal
  3. Goal types
  4. Tasks and subtasks
  5. Completion auditor
  6. Progress and goal controls
  7. Commands
  8. Settings
  9. License
pi-goal-x logo

pi-goal-x

Adds /goal functionality to pi. The agent helps you define a goal and plan, continues working on it automatically, and submits the result to an optional independent completion auditor.

The extension saves goal objectives, tasks, and progress across sessions. You can pause, resume, revise, or switch goals as your work changes.

Install

pi install npm:pi-goal-x

Create a goal

/goal Add CSV export to the reports page, with documentation and tests.

The agent discusses the goal with you, asks focused questions where needed, and proposes an objective, task plan, and completion requirements. You review the proposal and choose whether to use the completion auditor. Once you confirm, the agent starts working and continues automatically while the goal is active.

You can specify completion requirements, such as passing the test suite or producing a report with every required section. The agent tracks tasks and subtasks, records evidence, and works toward those requirements. If it gets blocked and needs your input, you can resolve the issue and resume.

If you already have a complete objective, use /goal-direct <objective> to create the goal and start immediately without drafting.

Goal types

TypeBehaviourExample uses
Regular — /goalAn outcome to achieve, with the agent choosing and adapting the plan.Features, debugging, research, and documentation.
Sisyphus — /sisyphusAn ordered plan that the agent follows one step at a time.Migrations, staged refactors, and release procedures.

For an ordered goal, you can provide the steps or define them with the agent:

/sisyphus Migrate authentication in this order:
1. Add the new token validator.
2. Update login and session refresh to use it.
3. Remove the old validator.
4. Run the authentication tests.

Use /sisyphus-direct <objective> to start an ordered goal without drafting.

Tasks and subtasks

The agent can divide a goal into tasks and subtasks, each describing part of the work required to complete it. During guided goal creation, you review the proposed plan before work begins.

For example, a CSV export goal could have this task plan:

Add CSV export to reports
├─ Review the report data and active filters
├─ Implement CSV export
│  ├─ Generate the CSV from filtered results
│  └─ Add a download button
├─ Test the export
└─ Document how to use it

As work progresses, the agent marks the current task, records completed work, and explains any skipped tasks. The dashboard shows what is done and what remains, including progress within subtasks. Task progress is saved when you pause and remains available in later sessions.

Tasks can also have their own completion requirements—for example, “The download contains only rows matching the active filters.” The agent records evidence against those requirements, and the completion auditor uses that evidence when reviewing the overall result.

Use /goal-tweak <change> to discuss revisions to the goal and its plan. Task tracking, completion requirements, and subtask depth are configurable in /goal-settings.

Completion auditor

When enabled, a separate agent reviews the work before the goal is accepted as complete. It checks the objective, tasks, recorded evidence, completion requirements, and workspace.

If the auditor approves, the goal is archived as complete. If it identifies unmet requirements, the goal remains open with feedback describing the work still needed. You can choose the auditor model in /goal-settings and toggle auditing for the focused goal with Ctrl+Shift+A.

Progress and goal controls

The dashboard above the editor shows the goal's status, task progress, current task, elapsed time, and token usage. Press Ctrl+Shift+T to expand it for the full task tree, completion requirements, evidence, and recent activity. Audit progress and results appear there too.

A project can have several open goals, with one focused goal per session. Switch with /goal-focus, pause with /goal-pause, or use /goal-tweak to discuss changes to the current goal. Pressing Esc during active work also pauses the goal; in the expanded dashboard, it collapses the view.

Commands

CommandWhat it does
/goal [idea]Discuss, plan, and confirm a regular goal.
/sisyphus [idea]Discuss, plan, and confirm an ordered goal.
/goal-direct <objective>Create and start a regular goal immediately.
/sisyphus-direct <objective>Create and start an ordered goal immediately.
/goal-listList open goals.
/goal-statusShow the focused goal and its progress.
/goal-focusChoose an open goal to work on.
/goal-unfocusLeave the current goal open without focusing on it.
/goal-tweak <change>Revise the current goal with the agent.
/goal-pausePause work on the focused goal.
/goal-resumeResume a paused or blocked goal.
/goal-clearArchive the focused goal after confirmation.
/goal-cancelCancel an unconfirmed draft.
/goal-settingsConfigure goal behaviour and the auditor.

For troubleshooting, use /goal-status verbose for more detail, /goal-status health or /goal-recovery to check for problems, and /goal-refresh to reload saved goals and settings after external changes. /goal-recovery repair offers repairs after confirmation.

Settings

Open /goal-settings to change these options. You can save defaults for all projects, override them for the current project, or remove an override to use the inherited value.

SettingWhat it controls
Explicit execution contracts (strictExecutionContract)Opt-in ready/wait protocol with one missing-decision repair, then pause. Defaults to false: successful executions continue automatically.
Autonomous run allowance (maxAutonomousRuns)Positive whole number of extension-started runs per creation or /goal-resume period. Unset means unlimited; zero disables automatic continuation. Settings edits change the limit without resetting usage.
Autonomous runs line (showAutonomousRuns)Controls the Autonomous runs: N/limit line that appears for a finite allowance. Defaults to true.
Task tracking (disableTasks)Turn task lists on or off. Set to true to disable them.
Autonomous task mutations (autonomousTasks)Let the agent add and restructure goal tasks and subtasks without asking for confirmation. Defaults to false: the agent proposes a task tree and you confirm the dialog.
Subtask depth (subtaskDepth)Limit how many levels of subtasks the agent can create.
Completion requirements (disableContracts)Turn explicit goal and task completion requirements on or off. Set to true to disable them.
Unfocused reminder (hideUnfocusedPrompt)When a session has no focused goal but open goals exist in the selected pool, the agent receives a [PI GOAL UNFOCUSED] reminder on every request. Set to true to stop that reminder. Defaults to false. This is independent of hideUnfocusedBanner, which hides only the unfocused widget and status hint. Neither setting selects or resumes a goal; the separate autoSelectSingleGoal setting still applies.
Auditor disabledTurn off independent completion review.
Auditor provider, model, and thinking levelChoose which model reviews completed work and its reasoning effort.

License

MIT

版本与发布记录

@fan92rus/pi-goal-x 共发布 23 个版本,首次发布于 2026/10/13;过去 12 个月发布了 23 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.36.1-fan.1latest2026/10/2817 天前
0.36.1-fan.02026/10/2817 天前
0.34.1-fan.12026/10/2817 天前
0.34.1-fan.02026/10/2817 天前
0.36.0-fan.32026/10/2717 天前
0.36.0-fan.22026/10/2717 天前

其他发布通道:fan → 0.32.3-fan.1。

关于 @fan92rus/pi-goal-x 的常见问题

@fan92rus/pi-goal-x 是什么?

Adds /goal to pi: conversational goal planning, flexible or ordered goals, persistent progress, and an independent completion auditor.

如何安装 @fan92rus/pi-goal-x?

在项目目录运行 npm install @fan92rus/pi-goal-x,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:typebox(^1.3.11)、@earendil-works/pi-ai(>=1.4.0 <2.0.0)、@earendil-works/pi-tui(>=1.4.0 <2.0.0)、@earendil-works/pi-coding-agent(>=1.4.0 <2.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。它还提供命令行工具 pi-goal-x-recover,可以用 npx pi-goal-x-recover 直接运行。

@fan92rus/pi-goal-x 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/fan92rus__pi-goal-x 是否存在。

@fan92rus/pi-goal-x 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@fan92rus/pi-goal-x 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.19.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@fan92rus/pi-goal-x 可以商用吗?

@fan92rus/pi-goal-x 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@fan92rus/pi-goal-x 的下载量有多少?

根据 npm 官方下载统计,@fan92rus/pi-goal-x 在 2026/10/14 – 2026/11/12 这 30 天内被下载 2,881 次,日均约 96 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@fan92rus/pi-goal-x 还在维护吗?

最新版本 0.36.1-fan.1 发布于 2026/10/28(17 天前);至今共发布 23 个版本,其中过去 12 个月发布了 23 个;首次发布于 2026/10/13。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。