generate_verification_plan
Creates a tiered verification plan for every node impacted by a PR, specifying structural, behavioral, and adversarial checks to determine what to verify before merging.
Instructions
Generates a tiered verification plan for every node impacted by the current PR or graph state. Returns concrete directives at three tiers: Tier 1 (structural — syntax, schema, type, lint checks), Tier 2 (behavioral — workflow correctness, contracts, integration boundaries), and Tier 3 (adversarial — concurrency, idempotency, retry storms, replay, cache stampede, partial failure). Each directive is keyed to a specific nodeId so an agent can prioritize execution. Use this to answer 'what should I verify before merging this PR?'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- Core business logic: iterates risk reports and generates tiered verification targets (Structural, Behavioral, Adversarial) with directives and execution recommendations.
export class VerificationPlanningEngine { public generatePlan(riskReports: RiskReport[]): VerificationPlan { const targets: VerificationTarget[] = []; const executionRecommendations = new Set<string>(); riskReports.forEach(report => { const { score, nodeId } = report; // Tier 1: Always do basic structural checks for impacted nodes targets.push({ nodeId, tier: VerificationTier.Structural, directive: `Run linting, schema validation, and type-checks for ${nodeId}`, priority: 'Low' }); // Tier 2: If integration count is noticeable or moderate risk if (score.integrationCount > 2 || score.overallRisk > 30) { targets.push({ nodeId, tier: VerificationTier.Behavioral, directive: `Validate workflow correctness and integration contracts pointing to/from ${nodeId}`, priority: 'Medium' }); executionRecommendations.add('Run integration tests simulating dependent service data.'); } // Tier 3: High Blast Radius or Runtime Criticality dictates adversarial logic if (score.blastRadius > 50 || score.runtimeCriticality >= 80) { targets.push({ nodeId, tier: VerificationTier.Adversarial, directive: `Check concurrency, malformed state handling, and race conditions for ${nodeId}`, priority: 'High' }); executionRecommendations.add('Conduct adversarial testing mapping race conditions against active DB constraints.'); executionRecommendations.add('Trigger manual QA or specialized Autonomous QA Agent for critical paths.'); } }); // Default global recommendations executionRecommendations.add('Delegate dynamic tests to CI execution pipelines.'); return { targets, executionRecommendations: Array.from(executionRecommendations) }; } } - Type definitions for VerificationTier enum, VerificationTarget interface, and VerificationPlan interface.
export enum VerificationTier { Structural = 'Tier 1 - Structural Verification', Behavioral = 'Tier 2 - Behavioral Verification', Adversarial = 'Tier 3 - Adversarial Verification' } export interface VerificationTarget { nodeId: string; tier: VerificationTier; directive: string; priority: 'High' | 'Medium' | 'Low'; } export interface VerificationPlan { targets: VerificationTarget[]; executionRecommendations: string[]; }