Open
Conversation
Replace text-only reporting with SendMessage-based communication. Agents now have Task tools (TaskGet/TaskUpdate/TaskList) for self-management and chain-read context inheritance. Uses 'report to assigner' language for v3.1 compatibility.
Replaces retired pact-scope-phases.md (ATOMIZE/CONSOLIDATE). Defines the scope verification protocol executed at the end of the outer CODE phase: contract compatibility (architect), contract fulfillment (lead metadata comparison), and integration testing.
Replace 'report to orchestrator' with 'report to assigner' across all 8 agent definitions. Maintains v3.1 compatibility where a coordinator (not just the lead) could assign work.
Retire ATOMIZE/CONSOLIDATE from task hierarchy and scope detection. Replace 'subagent' terminology with 'specialist/agent'. Update scope contract to position Agent Teams as primary executor. Add scope verification protocol to SSOT. Update agent stall detection for TeammateIdle hook model. Sync all SSOT extract sections and update verification script line ranges.
Replace subagent dispatch with flat team model (TeamCreate, SendMessage, Task-as-instruction). Retire ATOMIZE/CONSOLIDATE sections — scoped orchestration uses recursive P→A→C→T within standard ARCHITECT (decomposition) and CODE (rePACT + scope verification) phases. Add team lifecycle management and 5-level metadata model.
Sequential sub-scope execution using flat team model. Single branch per feature (no suffix branches or per-scope worktrees). Handoffs stored in Task metadata. Scope verification protocol reference replaces CONSOLIDATE. Nesting depth tracked in feature task metadata.
Update comPACT, peer-review, plan-mode, and imPACT dispatch models from subagent to Agent Teams. Replace run_in_background with teammate spawning. Update handoff reception to use SendMessage signals + Task metadata chain-read.
TeammateIdle hook detects specialist stalls by validating handoff metadata before allowing idle. TaskCompleted hook validates handoff quality on task completion. Both marked as needing empirical validation. Register new hooks in hooks.json.
Replace subagent dispatch with Agent Teams model. Add three-channel coordination model. Update task tracking for externalized state and chain-read pattern. Retire ATOMIZE/CONSOLIDATE from workflow description. Add Task-as-instruction dispatch model.
Add Agent Teams context to validate_handoff and memory_enforce comments. Add Agent Teams patterns to transcript parser alongside existing subagent patterns for backward compatibility.
Replace ATOMIZE/CONSOLIDATE references. Note that v3.0 uses single branch per feature — per-scope worktrees are a v3.1 capability.
Replace ATOMIZE/CONSOLIDATE checks with scope verification protocol checks. Add Agent Teams pattern validation. Remove per-scope worktree checks (v3.0 single-branch model). Update extract verification for new and retired protocol files.
Add Agent Teams pattern helpers and fixtures alongside existing subagent patterns. 172 new tests covering SendMessage, TeamCreate, TeamDelete, team_name dispatch, and workflow detection. All 1007 tests passing.
PACT v3.0: Agent Teams execution model with externalized state, three-channel coordination, Task-as-instruction, and recursive P→A→C→T at every level.
- teammate_idle.py: change exit 2 to exit 0 (safe no-op until empirical validation confirms TaskGet access from hooks) - task_completed.py: remove dead HANDOFF_FIELDS constant, clarify placeholder status with explicit comments - patterns.py: replace deprecated typing.Pattern with re.Pattern - Add 24 unit tests for both Agent Teams hooks
TeamDelete was running before peer-review, preventing reviewer teammates from being spawned into the team. Reorder so peer-review runs first, then team cleanup. Fix mirrored in CLAUDE.md.
- Phase Handoffs: update from stale 3-item text to v3.0 structured 5-item HANDOFF format stored as JSON in Task metadata - pact-scope-contract.md: "Mini-Code phase" → "inner CODE phase", rePACT delivery "Synchronous" → "Sequential with Agent Teams" - Sync SSOT with extract files, update verification line ranges
Strip inline TeamCreate/TeamDelete syntax from orchestrate.md and rePACT.md. All 5 command files now reference CLAUDE.md Team Lifecycle section for HOW, keeping only WHEN in the workflow flow.
- TASK_WITH_TEAM_PATTERN + TEAM_NAME_PATTERN: add re.IGNORECASE - Hook docstrings: "settings.json" → "hooks.json" - task_completed.py: add comment for QUARANTINE prefix - pact-task-tracking SKILL.md: add fallback for team config path
- Normalize "orchestrator" → "lead" in operational contexts across commands and protocols. Keep "Orchestrator" in CLAUDE.md identity. - Add metadata.assigner field to agent task metadata model. Agents discover their assigner via TaskGet chain-read pattern. - Update bootstrap prompt template to reference metadata.assigner. - Sync SSOT with all extract files, update verification line ranges.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates PACT from the subagent execution model (
Task(subagent_type=..., run_in_background=true)) to Claude Code Agent Teams — a flat team model withTeamCreate/SendMessage/TeamDelete, externalized Task state, and Task-as-instruction dispatch.Key changes:
SendMessagecoordinationTaskGet→ upstream metadata → artifact paths)pact-scope-verification.mdprotocolTeammateIdle(stall detection) +TaskCompleted(handoff quality gate)46 files changed (+2437/-926 lines) across commands, protocols, agents, hooks, skills, tests, and verification scripts.
Implementation Plan
Per
docs/plans/2026-02-09-v3-agent-teams-implementation.md— 16 tasks across 5 dependency layers, all completed.Test plan
pytest pact-plugin/tests/)plugin.jsonandmarketplace.json/PACT:orchestrateon a real taskTeammateIdleandTaskCompletedhooks fire correctly