Skip to content

[plan] Add workflow complexity detection heuristics #12199

@github-actions

Description

@github-actions

Objective

Implement heuristics to automatically detect workflow request complexity (basic/intermediate/advanced) based on user input characteristics.

Context

To support tiered complexity calibration (see related issue), we need algorithmic detection of request complexity. Research from #12193 shows uniform quality across diverse scenarios, indicating opportunity to differentiate response depth based on request sophistication.

Approach

  1. Define complexity indicators:
    • Basic signals: Single trigger, standard GitHub events, no tool customization, simple English description
    • Intermediate signals: Multiple triggers, tool combinations (2-3 tools), conditional logic mentioned, specific file paths referenced
    • Advanced signals: Custom toolchains, performance requirements, multi-stage workflows, security customization, complex integration points
  2. Implement scoring function in agent instructions or CLI
  3. Set thresholds: Basic (0-3 points), Intermediate (4-7 points), Advanced (8+ points)
  4. Pass detected tier to agent context for response calibration

Files to Modify

  • .github/instructions/*.instructions.md - Add complexity detection logic
  • pkg/cli/workflow_command.go or similar - Implement detection function
  • Agent system prompts - Use detected tier in generation
  • AGENTS.md - Document complexity detection algorithm

Acceptance Criteria

  • Complexity detection function implemented
  • Scoring algorithm defined with clear criteria
  • Thresholds validated with test cases
  • Detected tier passed to agent context
  • Tests cover edge cases and boundary conditions
  • Documentation explains detection methodology

Reference

Supports "Calibrate Complexity" recommendation from discussion #12193

AI generated by Plan Command for discussion #12193

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions