docs: plan skill-led development workflow

This commit is contained in:
jb
2026-09-03 16:41:27 -04:00
parent 0423ec3676
commit d99dbce93d
3 changed files with 506 additions and 1 deletions
+15 -1
View File
@@ -22,7 +22,21 @@ The strict `workflow` extension repeatedly failed before implementation because
## Support subagent launches through `multi_tool_use.parallel`
A user reported that launching the repository's subagent plugin through Pi's `multi_tool_use.parallel` wrapper does not work, although equivalent launches succeed outside the wrapper in another session. Reproduce with two minimal independent subagent launches, comparing direct tool calls with wrapped calls. Capture whether failure occurs during schema validation, dispatch, asynchronous acknowledgement, task registration, or completion delivery. The wrapper must return promptly for fire-and-forget launches, preserve each subagent's name and working directory, and allow the existing automatic completion notification to deliver each result exactly once without polling. Add focused integration coverage for successful parallel launch, one-child failure, cancellation, and duplicate-delivery prevention before changing either tool.
A user reported that launching subagents through Pi's `multi_tool_use.parallel` wrapper does not work, although equivalent launches succeed outside the wrapper in another session. The tool surface in the incident below was the harness-provided `functions.subagent` tool wrapped by `multi_tool_use.parallel`; it has not been proven to be the `subagent_spawn`/`subagent_wait` surface from this repository's `@jbcode/pi-subagents` package. Keep those implementations separate until tracing identifies the owner.
A second incident occurred while planning the skill-led development workflow on 03SEP2026. The complete sanitized wrapper payload, prompts, expected lifecycle, observed lifecycle, and direct-launch control are retained in [`docs/fixtures/subagent-parallel-idle-delivery-03SEP2026.json`](./fixtures/subagent-parallel-idle-delivery-03SEP2026.json). Environment evidence captured at `2026-09-03T15:54:57-04:00`:
- Pi `0.84.4`; repository subagent package `0.1.0` was present but is not yet identified as the failing tool implementation.
- Parent session `01a06885-7f00-7cff-bc2f-334984151941`, file `/home/jb/.pi/agent/sessions/--srv-data-code-jb-pi-harness-tools--/2026-09-03T18-26-14-400Z_01a06885-7f00-7cff-bc2f-334984151941.jsonl`.
- Parent backend `openai-codex/gpt-5.6-sol`, reasoning `high`.
- One `multi_tool_use.parallel` call launched `workflow-architecture` (`codebase-analyzer`), `workflow-history` (`precedent-locator`), and `workflow-patterns` (`codebase-pattern-finder`) with cwd `/srv/data/code/jb-pi/harness-tools`. Each wrapped result returned only a successful fire-and-forget acknowledgement; no child task or session ID was exposed.
- The children later appeared completed in the UI, but their automatic result payloads did not wake the idle orchestrator. The orchestrator remained parked until the user intervened.
- Follow-up `subagent_message` calls for all three returned acknowledgements saying the message was delivered to a running subagent, inconsistent with the completed UI state.
- A later direct, unwrapped `subagent` launch named `skill-workflow-plan-review` in the same parent session completed and delivered its result automatically after 14 minutes 9 seconds.
Use the retained three-agent JSON payload as the captured failing fixture. Also reproduce with two minimal independent children, comparing direct calls with one wrapped call. Include a case where the parent performs other work and then becomes idle before both children finish. Preserve exact tool-call payloads, acknowledgement timestamps, child IDs when available, terminal-state timestamps, parent idle transitions, callback queue entries, and delivered steer messages. Capture whether failure occurs during schema validation, dispatch, asynchronous acknowledgement, task registration, terminal-state publication, idle-parent wake-up, or completion delivery.
The wrapper must return promptly for fire-and-forget launches, preserve each subagent's name and working directory, expose enough identity to correlate acknowledgements and terminal results, transition UI and tool-visible status consistently, and deliver each result exactly once without polling or user intervention. Add focused integration coverage for successful parallel launch, staggered completion while the parent is idle, one-child failure, cancellation, late steering of an apparently completed child, and duplicate-delivery prevention before changing either tool.
## Investigate transient concurrent NeMo benchmark failures