Skip to content

feat: add cost optimisation PR review playbook - #24

Open
LukeDolemanResDiary wants to merge 1 commit into
ldastey-dev:mainfrom
LukeDolemanResDiary:luke/add-cost-optimisation-pr-assessment
Open

feat: add cost optimisation PR review playbook#24
LukeDolemanResDiary wants to merge 1 commit into
ldastey-dev:mainfrom
LukeDolemanResDiary:luke/add-cost-optimisation-pr-assessment

Conversation

@LukeDolemanResDiary

Copy link
Copy Markdown

Add playbooks/review/cost-optimisation.md — a PR-level cost review companion to the existing assess/cost-optimisation.md assessment.

The review playbook narrows the assessment scope to changes in a single PR, providing a checklist-driven evaluation across:

  • API & external calls (cache-first, polling, batching, short-circuit)
  • Data transfer (pagination, payload minimisation, compression)
  • Dependencies (stdlib duplication, package health, transitive graph)
  • Compute & resources (client initialisation, unbounded collections)
  • Observability (log verbosity, metric cardinality, trace sampling)
  • LLM token costs (output structure, metadata stripping, tool economy)
  • CI/CD (runner tier, dependency caching, stage ordering, path filtering)

Also registers the new playbook in core/.context/index.md so keyword routing picks it up on 'review cost', 'FinOps audit', 'cost review', and 'resource optimisation'.

Add playbooks/review/cost-optimisation.md — a PR-level cost review
companion to the existing assess/cost-optimisation.md assessment.

The review playbook narrows the assessment scope to changes in a single
PR, providing a checklist-driven evaluation across:

- API & external calls (cache-first, polling, batching, short-circuit)
- Data transfer (pagination, payload minimisation, compression)
- Dependencies (stdlib duplication, package health, transitive graph)
- Compute & resources (client initialisation, unbounded collections)
- Observability (log verbosity, metric cardinality, trace sampling)
- LLM token costs (output structure, metadata stripping, tool economy)
- CI/CD (runner tier, dependency caching, stage ordering, path filtering)

Also registers the new playbook in core/.context/index.md so keyword
routing picks it up on 'review cost', 'FinOps audit', 'cost review',
and 'resource optimisation'.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a PR-level cost optimisation review playbook and registers it for context routing.

Changes:

  • Adds cost-focused review criteria and output guidance.
  • Registers cost review keywords in the context index.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
playbooks/review/cost-optimisation.md Defines the cost optimisation review playbook.
core/.context/index.md Routes cost review keywords to the playbook.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread core/.context/index.md
| review compliance, compliance review | `.context/playbooks/review/compliance.md` | Data handling, encryption, audit compliance |
| review IaC, infrastructure review | `.context/playbooks/review/iac.md` | Infrastructure code patterns and security |
| review observability, observability review | `.context/playbooks/review/observability.md` | Logging, tracing, metrics instrumentation |
| review cost, FinOps audit, cost review, resource optimisation | `.context/playbooks/review/cost-optimisation.md` | API economy, dependencies, observability spend |

## Scope

Review **only the changes in this PR**. Evaluate:

- **Cache before network** — Every read must check cache first
- **Bound every output** — No unbounded result sets
- **Measure what you spend** — `duration_ms` and `cache_hit` logging on expensive operations
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.

2 participants