Skip to content

agents|feat: Plan provenance and trust-tiered orchestration #263

Description

@williamthorsen

Description

The orchestration pipeline treats all external plans uniformly: when externalPlan: true, both architecture and planning phases are forced to run regardless of the plan's origin, freshness, or quality. This produces 3-4 minutes of redundant validation when a plan was just created by a trusted skill like design-and-plan or refine-plan.

Evidence from ticket #247 (run 20260310-071948Z):

  • Architecture phase: 80 seconds, produced "low impact" with no corrections
  • Planning phase: 123 seconds, adopted the plan with zero meaningful deviations
  • Savings analysis finding C1 confirms the architecture phase "did not materially de-risk the implementation"

The solution adds provenance headers to plan artifacts (YAML frontmatter with skill, timestamp, baseSha, etc.) and trust-tiered phase skipping to the orchestration pipeline. Plans from known skills against an unchanged codebase skip architecture and planning entirely; plans with some divergence get lighter validation; unknown plans get full validation (current behavior).

Acceptance criteria

Must have

  • design-and-plan emits provenance headers in plan artifacts (skill, timestamp, baseSha, isInteractive)
  • refine-plan reads, updates, and writes provenance headers (preserves skill, increments iteration, updates baseSha)
  • Orchestrator parses provenance headers and computes trust tiers (high/medium/low)
  • High-trust plans (credible source + baseSha matches main) skip architecture and planning phases
  • High-trust plans get orchestrator-generated orchestration-plan.json (with JSON companion detection)
  • Medium-trust plans (credible source + baseSha diverged) skip architecture, run planning in adoption mode
  • Low-trust plans and plans without provenance get current behavior (full validation)
  • Trust tier is recorded in run-index.json config as planTrust
  • Phase decision events include trust-based skip reasons

Should have

  • plan-orchestrable-steps emits provenance headers
  • Phase 3 coder prompt uses {plan-md-path} is set conditional (not planning phase ran) to handle high-trust skip
  • Run summary includes plan trust row with skill name and freshness classification

Nice to have

  • writing-plans (external superpowers plugin) emits provenance headers (requires coordinated plugin update)

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