Skip to content

Add a focused Pi host adapter #6

Description

@Johnny-xuan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions