Skip to content

Policy-Driven Timeout and Limit Configuration System with Adaptive Overrides #394

@github-actions

Description

@github-actions

Strategic Improvement

Platform has 48 hardcoded values and 67 fallback patterns, limiting ability to self-optimize. Build policy.json system for all timeouts, iteration limits, thresholds with adaptive override mechanism based on runtime conditions (issue complexity, historical data, budget). Moves platform toward AGI-level self-tuning.

Acceptance Criteria

  • Extracts all hardcoded timeouts, limits, thresholds from scripts to config/policy.json with: default, min, max, adaptive_strategy
  • Implements adaptive override system: reads policy, applies context-specific adjustments (issue complexity score, historical stage duration, remaining budget)
  • Adds helper function _smart_policy(category, key) in lib/compat.sh for script access
  • Migrates at least 30 hardcoded values across: loop iteration limits, stage timeouts, retry counts, circuit breaker thresholds
  • Documents policy schema and adaptive strategies in docs/POLICY.md
  • Reduces platform hygiene hardcoded count from 48 to <20

Context

  • Priority: P6
  • Complexity: full
  • Generated by: Strategic Intelligence Agent
  • Strategy alignment: P6: Platform Self-Improvement (AGI-Level Readiness)

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-patrolCreated by autonomous patrol agentsready-to-buildIssue is ready for autonomous pipeline processingstrategicCreated by strategic intelligence agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions