Skip to content

[plan] Formalize proven patterns from high-scoring research scenarios #10288

@github-actions

Description

@github-actions

Objective

Extract and formalize proven patterns from high-scoring research scenarios into agent knowledge base, ensuring future workflows benefit from successful patterns.

Context

Research identified 5 high-impact patterns that consistently scored 5.0/5.0. These should be explicitly documented and emphasized in agent instructions.

High-Value Patterns to Formalize

  1. repo-memory for baselines (Used in 4/11 scenarios)

    • Pattern: Store baseline metrics, compare new runs, detect regressions
    • Example: API performance monitoring (BE-2) - 30-day historical tracking
    • When to use: Performance tracking, visual regression, flaky test analysis
  2. noop for healthy states (Prevents issue spam)

    • Pattern: Only create issues when problems detected, use noop otherwise
    • Example: Deployment monitoring (DO-1) - Only alert on failures
    • When to use: Monitoring workflows that run frequently
  3. Rate limiting for automated PRs (Team-friendly automation)

    • Pattern: Limit automated PR creation to N per day with CVSS prioritization
    • Example: Security scanner (DO-2) - Max 3 PRs/day
    • When to use: Any workflow that creates PRs automatically
  4. Multi-phase analysis pipelines (Complex statistical analysis)

    • Pattern: Data collection → Analysis → Historical tracking → Reporting
    • Example: Flaky test analyzer (QA-2) - 6-phase pipeline with scoring algorithm
    • When to use: Workflows requiring sophisticated analysis
  5. Smart duplicate prevention (30-day cache window)

    • Pattern: Hash issues/incidents, check cache before creating
    • Example: Deployment monitoring (DO-1), Security scanner (DO-2)
    • When to use: Monitoring that detects recurring problems

Approach

  1. Create patterns reference section in agent instructions
  2. Document each pattern with:
    • Description and benefits
    • Code example (10-15 lines)
    • When to use / when not to use
    • Link to source scenario from research
  3. Add decision tree for pattern selection
  4. Update agent to proactively suggest relevant patterns based on scenario type

Files to Modify

  • Update: .github/instructions/developer.instructions.md (add patterns reference section)
  • Create: .github/instructions/patterns/proven-patterns.md (detailed pattern catalog)

Acceptance Criteria

  • All 5 patterns documented with working code examples
  • Each pattern includes "When to use" and "When NOT to use" guidance
  • Decision tree helps agent select appropriate patterns
  • Examples are copy-paste-ready (under 20 lines each)
  • Agent instructions reference patterns section
  • Tested by generating 3 workflows that leverage these patterns

Expected Impact

Ensures future workflows benefit from proven high-scoring patterns, improving average quality score and reducing reinvention of successful approaches.
Related to #10285

AI generated by Plan Command for discussion #10248

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions