Problem
TreeWork's transaction runtime and project-state model are host-neutral, but the shipped package currently assumes Codex for skill discovery, hooks, MCP registration, and branch-worktree handoff. Pi can load Agent Skills and extensions, but it needs a focused adapter that preserves TreeWork's existing document, transaction, lifecycle, isolation, and verification semantics.
Proposed scope
Add an MIT-licensed Pi package adapter that:
- loads the existing TreeWork skill without duplicating its source;
- exposes the existing read-only TreeWork MCP server through Pi's lazy MCP adapter configuration;
- ports generated-state guardrails to Pi extension tool hooks;
- runs the existing stop/check boundary when a Pi agent settles;
- supports TreeWork branch worktree handoff by moving the Pi conversation into a session whose cwd is the entered worktree, while preserving conversation history;
- documents installation and verification without copying credentials or proprietary host implementation.
The adapter must not add TreeWork lifecycle states, persisted fields, document types, Team/Runner state, or a second source of truth.
Acceptance
- Pi package loads on the supported Pi version with a minimal always-active surface.
- Existing
tw runtime and MCP checks remain authoritative.
- Guardrail and workspace-switch behavior have automated tests.
make test and make validate pass.
- Installation and rollback are documented.
Problem
TreeWork's transaction runtime and project-state model are host-neutral, but the shipped package currently assumes Codex for skill discovery, hooks, MCP registration, and branch-worktree handoff. Pi can load Agent Skills and extensions, but it needs a focused adapter that preserves TreeWork's existing document, transaction, lifecycle, isolation, and verification semantics.
Proposed scope
Add an MIT-licensed Pi package adapter that:
The adapter must not add TreeWork lifecycle states, persisted fields, document types, Team/Runner state, or a second source of truth.
Acceptance
twruntime and MCP checks remain authoritative.make testandmake validatepass.