# Function validateScenario

- validateScenario(
  spec: {
  title: string;
  overview: string;
  requirements: string[];
  acceptanceCriteria: string[];
  constraints: string[];
  issueReferences: { number: number; raw: string }[];
  fileReferences: { path: string; line?: number }[];
  missingSections: string[];
  rawMarkdown: string;
  techStack?: {
  language?: string;
  framework?: string;
  packageManager?: string;
  };
  },
  results: readonly string[],
  ): Result<
  {
  satisfaction: number;
  totalCriteria: number;
  metCount: number;
  criteria: { criterion: string; met: boolean; matchedResults: string[] }[];
  allMet: boolean;
  },
  ScenarioError,
  >

  Validates execution results against a spec's acceptance criteria.

  #### Parameters

  - spec: {
    title: string;
    overview: string;
    requirements: string[];
    acceptanceCriteria: string[];
    constraints: string[];
    issueReferences: { number: number; raw: string }[];
    fileReferences: { path: string; line?: number }[];
    missingSections: string[];
    rawMarkdown: string;
    techStack?: {
    language?: string;
    framework?: string;
    packageManager?: string;
    };
    }

    - ##### title: string

      Spec title (from first H1 or H2 heading)

    - ##### overview: string

      Overview/description text

    - ##### requirements: string[]

      List of requirements

    - ##### acceptanceCriteria: string[]

      Acceptance criteria (checklist items)

    - ##### constraints: string[]

      Constraints or limitations

    - ##### issueReferences: { number: number; raw: string }[]

      Issue/PR references found in the spec

    - ##### fileReferences: { path: string; line?: number }[]

      File path references found in the spec

    - ##### missingSections: string[]

      Sections that were missing from the spec

    - ##### rawMarkdown: string

      Raw markdown source

    - ##### `Optional` techStack?: { language?: string; framework?: string; packageManager?: string }

      Inferred technology stack

      - ##### `Optional` language?: string

        Programming language

      - ##### `Optional` framework?: string

        Framework or library

      - ##### `Optional` packageManager?: string

        Package manager

  - results: readonly string[]

  #### Returns Result<
  {
  satisfaction: number;
  totalCriteria: number;
  metCount: number;
  criteria: { criterion: string; met: boolean; matchedResults: string[] }[];
  allMet: boolean;
  },
  ScenarioError,
  >

  - Defined in packages/nexus-agents/src/orchestration/scenario-validator.ts:69