[ORCH-124] Gate configuration per-task #259

Closed
opened 2026-02-02 22:56:04 +00:00 by jason.woltje · 0 comments
Owner

Implement per-task quality gate configuration allowing different quality gates for different task types.

Acceptance Criteria

  • Task metadata includes required gates
  • Gate profiles: strict (all gates), standard (tests + lint), minimal (tests only)
  • User selects profile on task creation
  • Orchestrator enforces selected gates

Implementation

Types and Profiles

  • Created gate-config.types.ts with profile definitions
  • Four profiles: strict, standard, minimal, custom
  • Default profiles per agent type:
    • Reviewer: strict (all gates including AI review)
    • Worker: standard (typecheck, lint, tests, coverage)
    • Tester: minimal (tests only)

GateConfigService

  • getDefaultProfile(agentType) - Get default profile for agent type
  • getProfileByName(name) - Get predefined profile
  • createTaskConfig(taskId, agentType, profile?, customGates?) - Create task config
  • getGateRequirements(config) - Extract requirements for coordinator
  • validateGateSelection(gates) - Validate custom gate selection
  • mergeGateSelections(base, override) - Merge gate configurations

Integration

  • Updated QualityGatesService to accept optional GateRequirements
  • Modified CoordinatorClientService request interface
  • Added gateProfile field to SpawnAgentDto
  • Gate requirements passed to coordinator for enforcement

Custom Features

  • Custom coverage thresholds per task
  • Custom gate selection for special tasks (e.g., docs, refactoring)
  • YOLO mode overrides all gate configurations
  • Backward compatible (works without gate config)

Test Coverage

  • GateConfigService: 35 tests, all passing
  • QualityGatesService: 54 tests (7 new integration tests)
  • Coverage: 98.3% for coordinator module
  • Overall: 93.58% coverage across orchestrator

Files Modified

  1. src/coordinator/types/gate-config.types.ts - New type definitions
  2. src/coordinator/gate-config.service.ts - New service
  3. src/coordinator/gate-config.service.spec.ts - New tests
  4. src/coordinator/quality-gates.service.ts - Integration
  5. src/coordinator/quality-gates.service.spec.ts - Integration tests
  6. src/coordinator/coordinator-client.service.ts - API update
  7. src/api/agents/dto/spawn-agent.dto.ts - DTO update

See docs/scratchpads/orch-124-task-config.md for detailed implementation notes.

Implement per-task quality gate configuration allowing different quality gates for different task types. ## Acceptance Criteria - [x] Task metadata includes required gates - [x] Gate profiles: strict (all gates), standard (tests + lint), minimal (tests only) - [x] User selects profile on task creation - [x] Orchestrator enforces selected gates ## Implementation ### Types and Profiles - Created gate-config.types.ts with profile definitions - Four profiles: strict, standard, minimal, custom - Default profiles per agent type: - Reviewer: strict (all gates including AI review) - Worker: standard (typecheck, lint, tests, coverage) - Tester: minimal (tests only) ### GateConfigService - getDefaultProfile(agentType) - Get default profile for agent type - getProfileByName(name) - Get predefined profile - createTaskConfig(taskId, agentType, profile?, customGates?) - Create task config - getGateRequirements(config) - Extract requirements for coordinator - validateGateSelection(gates) - Validate custom gate selection - mergeGateSelections(base, override) - Merge gate configurations ### Integration - Updated QualityGatesService to accept optional GateRequirements - Modified CoordinatorClientService request interface - Added gateProfile field to SpawnAgentDto - Gate requirements passed to coordinator for enforcement ### Custom Features - Custom coverage thresholds per task - Custom gate selection for special tasks (e.g., docs, refactoring) - YOLO mode overrides all gate configurations - Backward compatible (works without gate config) ## Test Coverage - GateConfigService: 35 tests, all passing - QualityGatesService: 54 tests (7 new integration tests) - Coverage: 98.3% for coordinator module - Overall: 93.58% coverage across orchestrator ## Files Modified 1. src/coordinator/types/gate-config.types.ts - New type definitions 2. src/coordinator/gate-config.service.ts - New service 3. src/coordinator/gate-config.service.spec.ts - New tests 4. src/coordinator/quality-gates.service.ts - Integration 5. src/coordinator/quality-gates.service.spec.ts - Integration tests 6. src/coordinator/coordinator-client.service.ts - API update 7. src/api/agents/dto/spawn-agent.dto.ts - DTO update See docs/scratchpads/orch-124-task-config.md for detailed implementation notes.
jason.woltje added this to the M6-AgentOrchestration (0.0.6) milestone 2026-02-02 22:56:04 +00:00
jason.woltje added the orchestrator label 2026-02-02 22:56:04 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaic/stack#259