Skip to content

consult: --type integration fails whenever --protocol is also given (no fallback from protocols/<p>/consult-types/ to top-level consult-types/) #1667

Description

@waleedkadous

Problem

consult --type integration works on its own — the skeleton ships consult-types/integration-review.md at the top level and the project-local copy resolves. But builders running inside a protocol lane habitually add --protocol spir|bugfix|… (needed for spec/plan/impl/pr reviews), and then:

Prompt template not found: codev/protocols/spir/consult-types/integration-review.md

so lanes conclude "integration doesn't exist" and fall back to --type pr. Reported from three builders in one workspace on 2026-09-09. codev 3.3.3.

Root cause

dist/commands/consult/index.js resolveProtocolPrompt():

const relativePath = protocol
  ? `protocols/${protocol}/consult-types/${templateName}`
  : `consult-types/${templateName}`;

With --protocol it tries exactly one path and throws. integration-review.md is protocol-agnostic by design (it lives only at the top level; no protocol dir ships one), so any --protocol + --type integration combination is guaranteed to fail.

Proposed fix

Fall back: if protocols/<p>/consult-types/<type>-review.md is absent, try consult-types/<type>-review.md before throwing (and say which path was used in --verbose). Alternatively, ignore --protocol for the protocol-agnostic types (integration) with a note. Either way the help text for --type should say integration is top-level only.

Refs: #1113 (--base is integration-only).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions