Skip to content

[feat] Validate workflows, prompts and scorers in review --branch #1248

Open

Description

@SaulMoro

Parent: #818

Goal

Let a team repo stop a broken workflow before it merges. teamai review --branch <name> already exits 1 on a fail finding "so CI can gate on it" (src/review-branch.ts:506-509, :541), but it checks only skills, rules and agents (:108-115). A branch with an invalid workflow passes it, and push only warns (src/push.ts:869-877). Today the error shows up at the next pull, which keeps the last valid version.

Example

team-repo PR adds workflows/deploy.yaml with  needs: [biuld]

CI: teamai review --branch feature/deploy
  fail  workflows/deploy.yaml  step "release" needs "biuld", which is not a step in this workflow
  exit 1  → merge blocked

Scope

  • review --branch validates workflows/ with the validator pull uses (syncWorkflowDefinitions, which already returns diagnostics in invalid), including the prompt_file targets under prompts/ (src/workflow/cache.ts:420-458). Each invalid file is a fail finding with its path and message.
  • When [feat] Add workflow scorers and recorded quality labels #1085 adds scorers/, its validator joins the same check.
  • The guide shows the CI job.

Out of scope

Changing push, and checking that a workflow runs.

Dependencies

  • Blocked by: none
  • Unblocks: none

Acceptance criteria

  • The example branch fails review --branch with the finding shown, and exit code 1.
  • A branch whose workflows all validate passes, and the check writes nothing.

Verification

Focused review-branch tests with a valid and an invalid workflow; build/typecheck/lint; one real-CLI run of review --branch on a fixture team repo. Bilingual guide update.

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