Skip to content

[Proposal] Quality Gates - enforce lint/type-check before feature_mark_passing #96

@cabana8471-arch

Description

@cabana8471-arch

Related Issues

Problem

Currently, the agent can call feature_mark_passing without any verification that the code actually works. This leads to:

  1. Features marked as "passing" that don't compile - No lint/type-check enforcement
  2. No evidence of what was tested - We don't know if the agent actually verified the feature
  3. Features stuck in "in_progress" after agent crash - No auto-recovery mechanism
  4. No retry logic - If a feature fails, no tracking of failure count or reason

Proposed Solution

I've implemented "Quality Gates" in my fork that addresses all these issues:

1. Auto-detect Linters and Type Checkers

# Automatic detection based on project config files
Linters:    ESLint, Biome, ruff, flake8
Type-check: TypeScript (tsc), Python (mypy)

2. Enforce Quality Checks Before feature_mark_passing

# New MCP tool: feature_verify_quality
# Runs detected linters/type-checkers
# In strict mode, blocks marking if checks fail

3. Store Quality Results as Evidence

New database columns:

4. Auto-clear Stuck Features

On agent startup, features stuck in in_progress for >1 hour are reset to pending with failure tracking.

Implementation Details

  • ~400 lines in new quality_gates.py module
  • Small changes to feature_mcp.py (adds feature_verify_quality, feature_report_failure tools)
  • New DB columns (auto-migrated by SQLAlchemy)
  • Backwards compatible: disabled by default

Configuration

// .autocoder/config.json
{
  "quality_gates": {
    "enabled": true,
    "strict_mode": true,  // Block marking if checks fail
    "checks": {
      "lint": true,
      "type_check": true
    }
  }
}

Questions for Maintainers

  1. Would you be interested in this feature?
  2. Should strict_mode be the default, or should it just warn?
  3. Any concerns about adding DB columns for tracking?

Happy to submit a PR if there's interest. The implementation is already working in my fork.

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