Skip to content

Hardcoded Policy Migration Engine with Adaptive Override Framework #660

Description

@github-actions

Strategic Improvement

Platform health scan shows 48 hardcoded values blocking true self-improvement. Build a scanner that extracts hardcoded tunables (timeouts, thresholds, limits, retry counts) from scripts, migrates them to config/policy.json with defaults, and adds runtime override support. Each value gets: config key, default, env var override, adaptive hint (which intelligence module might tune it). This is foundational for the platform to improve itself - current hardcoding prevents learning-based optimization. Targets top 20 highest-impact tunables first (identified via git blame frequency + intelligence module references).

Acceptance Criteria

  • Scanner identifies hardcoded numeric thresholds, timeouts, limits in all scripts
  • Generates config/policy.json with structured schema (section → key → {default, env_var, adaptive_hint, rationale})
  • Refactors top 20 highest-impact scripts to read from config with fallback to env vars
  • Helper function _policy_int <section> <key> [default] added to lib/compat.sh
  • Documents migration path for remaining 28 values
  • All tests pass after migration (validates backward compatibility)
  • Adds config validation to shipwright doctor

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