Skip to content

Optimize daily code review agent with focused detection playbook#128

Merged
torosent merged 2 commits intomainfrom
torosent/optimize-daily-review-agent
Mar 4, 2026
Merged

Optimize daily code review agent with focused detection playbook#128
torosent merged 2 commits intomainfrom
torosent/optimize-daily-review-agent

Conversation

@torosent
Copy link
Member

@torosent torosent commented Mar 4, 2026

This pull request updates the daily code review agent guide to improve the code analysis process and provide reviewers with a more concrete, actionable workflow. The most significant change is the addition of a comprehensive "Detection Playbook" appendix, which standardizes the patterns and thresholds for code scanning. This helps reviewers consistently identify bugs, dead code, and modernization opportunities in the TypeScript/Node.js codebase.

Enhancements to code analysis workflow:

  • Step 2 instructions now reference the new Detection Playbook for specific patterns and thresholds, ensuring a more systematic and objective review process.

Addition of Detection Playbook (Appendix):

  • Introduced a detailed appendix outlining complexity thresholds (function length, nesting, cyclomatic complexity), bug patterns (error handling, async issues, resource leaks, repo-specific issues), and dead code patterns (unused imports/variables, unreachable code, stale TODOs).
  • Included TypeScript modernization patterns, clarifying which improvements to flag (optional chaining, async/await, spread, etc.) and which are out of scope for this repo.
  • Provided refactoring strategies to guide reviewers when proposing structural changes, emphasizing that refactoring should accompany a concrete fix

Replace ~750 lines of generic, multi-language reference material with a
~145-line focused Detection Playbook appendix tailored to this TypeScript SDK.

Changes:
- Remove Python/C#/Java/Go detection patterns (irrelevant to this repo)
- Remove React/Next.js section (not in this codebase)
- Remove ES2024+/ES2025 features (repo targets ES2022)
- Remove bash grep commands (agent uses search/read tools)
- Deduplicate patterns that appeared in 2-3 places
- Add repo-specific bug patterns from copilot-instructions.md
- Add 'Do NOT Flag' guardrails for CommonJS, React, ES2024+
- Integrate appendix into Step 2 workflow with cross-reference
- Organize into 5 scannable sections (A-E) mapped to Categories
Copilot AI review requested due to automatic review settings March 4, 2026 19:25
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR streamlines the daily code review agent definition by replacing a large, generic multi-language appendix with a shorter, repo-specific “Detection Playbook” tailored to this DurableTask TypeScript/Node.js SDK.

Changes:

  • Updates Step 2 to explicitly reference the new appendix for concrete detection heuristics.
  • Adds a focused “Detection Playbook” appendix with complexity thresholds, bug patterns (including Durable Task replay-specific pitfalls), dead-code patterns, modernization guidance, and refactoring strategies.
  • Removes irrelevant and duplicated reference material to reduce token usage and noise.

@torosent
Copy link
Member Author

torosent commented Mar 4, 2026

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Contributor

Copilot AI commented Mar 4, 2026

@torosent I've opened a new pull request, #129, to work on those changes. Once the pull request is ready, I'll request review from you.

@torosent torosent merged commit b74fd05 into main Mar 4, 2026
16 checks passed
@torosent torosent deleted the torosent/optimize-daily-review-agent branch March 4, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants