Skip to content

Intelligence Cache Invalidation and Refresh Policy #466

@github-actions

Description

@github-actions

Strategic Improvement

Intelligence cache exists but has no invalidation policy beyond TTL. Stale cache = bad decisions = wasted cost. Build smart invalidation: when hotspot files change, when test coverage shifts, when architecture.json updates. Add selective refresh (don't recompute everything, just affected sections). Improves cost efficiency and decision quality.

Acceptance Criteria

  • Add cache fingerprinting: hash of git HEAD, test coverage %, architecture.json mtime
  • Implement sw-intelligence.sh check-cache that compares fingerprints and invalidates on mismatch
  • Add selective refresh: if only test coverage changed, refresh only coverage section
  • Log cache hit/miss/invalidation rates to cost tracking
  • Measure: cache invalidation accuracy (% of invalidations that led to different recommendations)

Context

  • Priority: P3
  • Complexity: fast
  • Generated by: Strategic Intelligence Agent
  • Strategy alignment: P3: Cost Efficiency

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions