Skip to content

Feat/pi subagents backend - #539

Closed
coding-chong wants to merge 3 commits into
mindfold-ai:mainfrom
coding-chong:feat/pi-subagents-backend
Closed

coding-chong wants to merge 3 commits into
mindfold-ai:mainfrom
coding-chong:feat/pi-subagents-backend

Conversation

@coding-chong

@coding-chong coding-chong commented Aug 12, 2026

Copy link
Copy Markdown

Summary by CodeRabbit

  • New Features

    • Added project migration support with dry-run, validation, backup, rollback, and failure recovery options.
    • Added Pi sub-agent support with updated research, implementation, and checking workflows.
    • Added context telemetry for tracking child-session activity and usage.
    • Added safer task handoff, acceptance evidence, timeouts, and run tracking.
  • Improvements

    • Legacy sub-agent behavior is now opt-in and clearly identified as a rollback option.
    • Updated generated project settings, agent guidance, and platform documentation.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 90c7d16f-beff-41ae-b6bd-fa782d8161f6

📥 Commits

Reviewing files that changed from the base of the PR and between ad28698 and 30c3d80.

📒 Files selected for processing (16)
  • PI-SUBAGENTS-FORK-HANDOFF.md
  • packages/cli/scripts/migrate-trellis-pi-subagents.ps1
  • packages/cli/src/configurators/pi.ts
  • packages/cli/src/templates/common/bundled-skills/trellis-meta/SKILL.md
  • packages/cli/src/templates/common/bundled-skills/trellis-meta/references/platform-files/platform-map.md
  • packages/cli/src/templates/pi/agents/trellis-check.md
  • packages/cli/src/templates/pi/agents/trellis-implement.md
  • packages/cli/src/templates/pi/agents/trellis-research.md
  • packages/cli/src/templates/pi/extensions/context-telemetry/index.ts.txt
  • packages/cli/src/templates/pi/extensions/trellis/index.ts.txt
  • packages/cli/src/templates/pi/index.ts
  • packages/cli/src/templates/pi/settings.json
  • packages/cli/src/templates/trellis/workflow.md
  • packages/cli/test/regression.test.ts
  • packages/cli/test/scripts/migrate-trellis-pi-subagents.test.ts
  • packages/cli/test/templates/pi.test.ts

📝 Walkthrough

Walkthrough

The PR adds a Pi subagents release handoff, a PowerShell migration and rollback utility, context telemetry, updated Pi agent contracts, legacy dispatch gating, workflow guidance, and comprehensive regression tests.

Changes

Pi subagents integration

Layer / File(s) Summary
Release and injection procedure
PI-SUBAGENTS-FORK-HANDOFF.md
Documents release verification, local CLI construction, initialization, migration, validation, canary execution, and operational boundaries.
Migration preflight and transformation
packages/cli/scripts/migrate-trellis-pi-subagents.ps1
Validates project contracts and hashes, transforms recognized files, updates Pi settings and metadata, and plans managed changes.
Migration application and rollback
packages/cli/scripts/migrate-trellis-pi-subagents.ps1, packages/cli/test/scripts/migrate-trellis-pi-subagents.test.ts
Adds verified backups, manifests, atomic writes, post-write validation, restoration on failure, guarded rollback, dry-run handling, idempotency, and fail-closed tests.
Context telemetry extension
packages/cli/src/templates/pi/extensions/context-telemetry/index.ts.txt, packages/cli/src/configurators/pi.ts, packages/cli/src/templates/pi/index.ts, packages/cli/test/templates/pi.test.ts
Adds validated child-session telemetry with bounded JSONL records for lifecycle events and tests for parsing, normalization, registration, persistence, and filtering.
Pi agents and legacy dispatch control
packages/cli/src/templates/pi/agents/*, packages/cli/src/templates/pi/extensions/trellis/index.ts.txt, packages/cli/src/templates/pi/settings.json, packages/cli/src/configurators/pi.ts, packages/cli/test/templates/pi.test.ts
Updates agent policies for pi-subagents, acceptance metadata, context limits, and task transport. Gates legacy dispatch behind an environment variable and adds PowerShell context propagation.
Workflow guidance and regression coverage
packages/cli/src/templates/trellis/workflow.md, packages/cli/src/templates/common/bundled-skills/trellis-meta/*, packages/cli/test/regression.test.ts
Documents visible Pi dispatch, fresh runs, ownership, acceptance, recovery, and legacy restrictions. Regression tests verify package installation and generated contracts.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

Suggested reviewers: taosu0216

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant