Skip to content

Agent Mode: Add quality gates before completion #115

@CarGDev

Description

@CarGDev

Problem

Agent completed tasks without running quality checks. Code was written but not validated before marking task complete.

Missing Quality Gates

  1. TypeScript Check

    • Run tsc --noEmit after code generation
    • Report errors before marking complete
  2. Lint Check

    • Run ESLint/Biome if configured
    • Fix auto-fixable issues
  3. Test Execution

    • Run existing tests if present
    • Ensure no regressions
  4. Build Verification

    • Attempt build if build script exists
    • Report build failures

Expected Flow

Agent: Plan complete. Running quality checks...

✓ TypeScript: No errors
✓ Lint: 2 warnings (non-blocking)
✗ Tests: 1 failing test

Quality check failed. Options:
1. Show failing test details
2. Attempt to fix
3. Mark complete anyway (not recommended)
4. Abort

Implementation Suggestions

interface QualityGate {
  name: string;
  command: string;
  blocking: boolean; // If true, must pass to complete
  autoFix?: string;  // Command to auto-fix issues
}

const defaultGates: QualityGate[] = [
  { name: 'TypeScript', command: 'tsc --noEmit', blocking: true },
  { name: 'Lint', command: 'npm run lint', blocking: false },
  { name: 'Test', command: 'npm test', blocking: true },
];

Priority

🟡 Medium - Improves output quality but agent can function without


Generated from model evaluation test

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