Move Execution, InternalTask, and the status predicates into job-state.ts; the supervisor now creates, schedules, and settles shared rows only through its host. Concentrate cancellation and shutdown settlement in one supervisor policy, make restored rows honest (no fabricated AgentConfig), and thread load-time cap limits through WorkflowRunSpec so release enforcement and the review card share one value. Agent discovery is memoized per cwd within a prepare call.
Each `pi-workflow-run-v1` step record now carries `items`: one row per
fanned-out child with its source line, a stable per-item input hash, status,
attempt count, bounded output, and timings, alongside the step's aggregate
record. The format has shipped nowhere, so it is extended in place.
Item identity (`itemValue`) now rides the task identity into the child's
snapshot instead of living only on the manager's internal task, so the
journal reads the line the child actually ran rather than re-deriving it
from the source output. Item hashes key the plan, step, args, and item line
— never prior outputs — so identical items hash alike across runs, and item
outputs use the same bound and truncation marker as step outputs.
Persistence validates the rows (one-based index, required fields) and the
optional item identity on job snapshots. Round-trip tests cover restore,
bounding, and hash stability, plus a property test for the hash inputs.
The t2 implementer claimed a merge it had not made; briefs since carried the verification wording per-brief. The rule belongs in the standing worker rules once, with a checkable criterion.
The 2026-11-26 pipeline session mangled committed wiki state-log bullets three times with prefix-anchored edits, each silent at edit time. scripts/check-state-log.ts fails when a state-log line present in HEAD is missing or modified in the working tree; additions pass. Wired as npm run wikicheck, on_settle in .pi/verify.json.
Move ready-step release, skip propagation, item fan-out and settle, the per-run cap, and workflow cancellation settlement into src/workflow-supervisor.ts. The manager keeps the FIFO pool, worker accounting, admission, and the job/task lifecycle, and hands a run to the supervisor through a small host seam. Behavior-preserving move; spec/SubagentJobs.tla untouched.
Correctness: exclude workflow dispatch from child sessions, surface invalid workflow item configuration, reject {item} outside each-steps, and confirm every untrusted project directory once per workflow start. Refactors: share task settlement, status icons, validation failures, task identity construction, and workflow run state; normalize item counts to a map. Document YAML repair leniency and glossary wording.
Resolve the t4/t6 overlap in index.ts by keeping the trust-gated workflow
start path and adding the journal persistence hook and entry renderer.
Adapt journal step lookup to the item engine: an each-step's item children
share their step's id, so the run journal records one row per plan step from
the coordinator's aggregate status and joined output. Per-item journal rows
remain a follow-up. Adds a regression test for the seam.
Generalizes the chain predecessor to needs sets, adds skipped as a terminal
step status with a transitive cascade, encodes each-step items (fail-soft,
zero items fail the step, failed items fail the run), and reserves at most
min(MaxWorkers - 1, 4) concurrent steps per workflow run inside the global
pool. Commits a run's outcome only after every step settled, so skip
propagation completes before a run is called failed.
Move the extension from ~/.pi/agent/extensions/subagent into this repo
and package it for pi install:
- Sources under src/, entry exposed via the pi manifest in package.json
- Host packages (@earendil-works/*, typebox) stay peer dependencies
- Tests, TLA+ spec, and research notes move along unchanged in behavior
- Gates (.pi/verify.json): typecheck, tests, tlc, smoke — all green
- Install: pi install git:git.rwiesner.com/alex/pi-subagent or local path
Scaffold the per-repo configuration the engineering skills read:
- docs/agents/issue-tracker.md: Gitea (git.rwiesner.com/alex/pi-subagent)
driven by the `gt` CLI, including Gitea's native issue dependencies and
the absence of sub-issues
- docs/agents/triage-labels.md: the five canonical triage roles at their
default label strings
- docs/agents/domain.md: single-context layout (root GLOSSARY.md + docs/adr/)
- AGENTS.md: the `## Agent skills` block pointing at each of the above