Skip to content

Phase-skip logic too aggressive when plan contains research/investigation tasks #186

@michael-wojcik

Description

@michael-wojcik

Problem

The orchestrator's phase-skip logic checks for "approved plan exists" and "plan section complete" to decide whether to skip PREPARE and ARCHITECT phases. However, it doesn't account for research/investigation tasks within the plan that explicitly require PREPARE-phase execution.

What happened

During SDK optimization orchestration (2026-02-19), the orchestrator:

  1. Detected an approved design doc and implementation plan
  2. Skipped PREPARE (rationale: "approved plan with complete sections")
  3. Skipped ARCHITECT (rationale: "approved design doc covers architecture")
  4. User caught the error — the implementation plan contained two explicit research items ([P1] Remove MCP tool documentation from all skills #11 agent-memory simplification, [P1] Move inline code examples to examples/ directories #12 worktree_guard updatedInput) that needed PREPARE-phase investigation
  5. User also noted ARCHITECT shouldn't be pre-skipped since PREPARE outcomes could require architectural decisions

Root cause

The completeness check in pact-completeness.md checks for 6 incompleteness signals (unchecked research, TBD values, forward references, etc.) but doesn't explicitly check for investigation/research tasks in the implementation plan that require runtime execution during PREPARE.

Proposed Fix

  1. Add a 7th incompleteness signal: "Implementation plan contains research/investigation tasks (go/no-go items, feasibility studies, audit tasks)"
  2. Update pact-completeness.md with the new signal
  3. Update the phase-skip guidance in orchestrate.md to explicitly call out research tasks as a reason NOT to skip PREPARE
  4. Consider: ARCHITECT should not be pre-skipped when PREPARE is running, since PREPARE outcomes may require architectural decisions (add guidance to post-PREPARE re-assessment)

Files to modify

  • pact-plugin/protocols/pact-completeness.md
  • pact-plugin/commands/orchestrate.md (phase-skip section + post-PREPARE re-assessment)

Reference

  • Design doc: docs/plans/2026-02-19-sdk-optimization-design.md
  • Session where this was discovered: SDK optimization orchestration (2026-02-19)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions