Summary
TaskPlane 0.30.4 Runtime V2 does not consistently honor the documented agent-template contract:
- The worker spawn path ignores
standalone: true and always composes the stock worker body with the local body.
- The reviewer bridge ignores
standalone: true and always appends the local reviewer body to the stock body.
- The merger spawn path bypasses composition entirely and passes the raw local Markdown file, including frontmatter, as the complete system prompt.
- The canonical loader cannot find bundled templates when TaskPlane is installed by Pi under
~/.pi/agent/npm/node_modules/taskplane, because the package resolver does not try its own module-relative package root.
The exported loadAgentDef() helper already has the intended standalone/composition semantics, but the live Runtime V2 worker/reviewer/merger paths do not consistently use it.
This is related to #612: unintended worker composition increased one observed Windows worker prompt from 5,775 characters to 32,584 characters, reaching the Windows command-line limit discussed there. This report is about the ignored rendering contract rather than prompt transport.
Steps to Reproduce
- Install TaskPlane 0.30.4 through Pi so it resides under
~/.pi/agent/npm/node_modules/taskplane.
- Create
.pi/agents/task-worker.md and .pi/agents/task-reviewer.md with non-empty bodies and standalone: true frontmatter.
- Create a non-standalone
.pi/agents/task-merger.md containing concise project-specific guidance.
- Use Runtime V2 and inspect the system prompts constructed at the worker, reviewer, and merger spawn sites.
- Independently call the exported
loadAgentDef() for the same files and compare its results with the live spawn paths.
Expected Behavior
- Worker and reviewer prompts with
standalone: true contain only their local bodies, with frontmatter removed.
- A non-standalone merger prompt contains the stock merger body followed by the local body under the project-guidance separator.
- Every Runtime V2 role uses one canonical parsing/rendering implementation.
- Bundled templates resolve from TaskPlane's own installed module root, including Pi-managed package installations.
Actual Behavior
Observed with non-proprietary measurements from a real project:
- Worker: 26,772-character stock body + 5,775-character local body rendered as 32,584 characters;
standalone: true was ignored.
- Reviewer: 10,856-character stock body + 3,205-character local body rendered as 14,098 characters;
standalone: true was ignored.
- Merger: the 600-character local Markdown file was passed verbatim, including frontmatter; the stock body was absent.
- Supervisor composition worked correctly and provides a useful reference implementation.
- Calling
loadAgentDef() directly produced the correct standalone worker/reviewer results. For merger composition, its package lookup initially missed the Pi-managed TaskPlane installation until a module-relative package-root candidate was added.
The divergent paths are in:
extensions/taskplane/execution.ts (Runtime V2 worker prompt construction)
extensions/taskplane/agent-bridge-extension.ts (loadReviewerPrompt())
extensions/taskplane/merge.ts (merger system prompt construction)
extensions/taskplane/path-resolver.ts (bundled-template resolution)
Proposed Fix
- Route worker and merger prompt construction through a shared canonical agent-definition loader.
- Move reviewer parsing/rendering onto the same lightweight shared loader, or make its current loader honor
standalone: true identically.
- Add TaskPlane's module-relative package root as the first installed-package candidate in
resolveTaskplanePackageFile().
- Add Runtime V2 tests covering standalone worker/reviewer prompts, composed merger prompts, frontmatter stripping, and Pi-managed installation layout.
Acceptance Criteria
Logs / Output
worker: base=26772 local=5775 rendered=32584 standaloneHonored=false
reviewer: base=10856 local=3205 rendered=14098 standaloneHonored=false
merger: rawLocal=600 containsStockBody=false startsWithFrontmatter=true
expected after compatibility fix:
worker: rendered=5775 standalone=true
reviewer: rendered=3205 standalone=true
merger: rendered=7402 composed=true
supervisor: rendered=10809 composed=true
Relevant Config
taskRunner:
worker:
tools: read,write,edit,bash,grep,find,ls,aft_outline,aft_zoom,aft_inspect
reviewer:
tools: read,write,bash,grep,find,ls,aft_outline,aft_zoom,aft_inspect
orchestrator:
supervisor:
autonomy: supervised
Environment
- TaskPlane: 0.30.4
- Pi: 0.83.0
- Node.js: 24.18.0
- OS: Windows 11
- Runtime: V2 subprocess mode
Pre-flight checks
Summary
TaskPlane 0.30.4 Runtime V2 does not consistently honor the documented agent-template contract:
standalone: trueand always composes the stock worker body with the local body.standalone: trueand always appends the local reviewer body to the stock body.~/.pi/agent/npm/node_modules/taskplane, because the package resolver does not try its own module-relative package root.The exported
loadAgentDef()helper already has the intended standalone/composition semantics, but the live Runtime V2 worker/reviewer/merger paths do not consistently use it.This is related to #612: unintended worker composition increased one observed Windows worker prompt from 5,775 characters to 32,584 characters, reaching the Windows command-line limit discussed there. This report is about the ignored rendering contract rather than prompt transport.
Steps to Reproduce
~/.pi/agent/npm/node_modules/taskplane..pi/agents/task-worker.mdand.pi/agents/task-reviewer.mdwith non-empty bodies andstandalone: truefrontmatter..pi/agents/task-merger.mdcontaining concise project-specific guidance.loadAgentDef()for the same files and compare its results with the live spawn paths.Expected Behavior
standalone: truecontain only their local bodies, with frontmatter removed.Actual Behavior
Observed with non-proprietary measurements from a real project:
standalone: truewas ignored.standalone: truewas ignored.loadAgentDef()directly produced the correct standalone worker/reviewer results. For merger composition, its package lookup initially missed the Pi-managed TaskPlane installation until a module-relative package-root candidate was added.The divergent paths are in:
extensions/taskplane/execution.ts(Runtime V2 worker prompt construction)extensions/taskplane/agent-bridge-extension.ts(loadReviewerPrompt())extensions/taskplane/merge.ts(merger system prompt construction)extensions/taskplane/path-resolver.ts(bundled-template resolution)Proposed Fix
standalone: trueidentically.resolveTaskplanePackageFile().Acceptance Criteria
standalone: truerenders only the local body.standalone: truerenders only the local body.Logs / Output
Relevant Config
Environment
Pre-flight checks
taskplane doctorsuccessfully in the native environment.