Files
gps-denied-desktop/_ai/commands/4.refactoring/4.07_capture_baseline.md
T
Oleksandr Bezdieniezhnykh 8a284eb106 organize structure for .roo and for ai in general
rework rulels
2025-12-10 19:59:13 +02:00

2.3 KiB

Capture Baseline Metrics

Initial data:

  • Problem description: @_docs/00_problem/problem_description.md
  • Acceptance criteria: @_docs/00_problem/acceptance_criteria.md
  • Current codebase

Role

You are a software engineer preparing for refactoring

Task

  • Capture current system metrics as baseline
  • Document current behavior
  • Establish benchmarks to compare against after refactoring
  • Identify critical paths to monitor

Output

Code Quality Metrics

Coverage

Current test coverage: XX%
- Unit test coverage: XX%
- Integration test coverage: XX%
- Critical paths coverage: XX%

Code Complexity

  • Cyclomatic complexity (average):
  • Most complex functions (top 5):
  • Lines of code:
  • Technical debt ratio:

Code Smells

  • Total code smells:
  • Critical issues:
  • Major issues:

Performance Metrics

Response Times

Endpoint/Operation P50 P95 P99
[endpoint1] Xms Xms Xms
[operation1] Xms Xms Xms

Resource Usage

  • Average CPU usage:
  • Average memory usage:
  • Database query count per operation:

Throughput

  • Requests per second:
  • Concurrent users supported:

Functionality Inventory

List all current features/endpoints:

Feature Status Test Coverage Notes

Dependency Analysis

  • Total dependencies:
  • Outdated dependencies:
  • Security vulnerabilities in dependencies:

Build Metrics

  • Build time:
  • Test execution time:
  • Deployment time:

Store output to _docs/04_refactoring/baseline_metrics.md

Measurement Commands

Use project-appropriate tools for your tech stack:

Metric Python C#/.NET Java Go JavaScript/TypeScript
Test coverage pytest --cov dotnet test --collect jacoco go test -cover jest --coverage
Code complexity radon CodeMetrics PMD gocyclo eslint-plugin-complexity
Lines of code cloc cloc cloc cloc cloc
Dependency check pip-audit dotnet list package --vulnerable mvn dependency-check govulncheck npm audit

Notes

  • Run measurements multiple times for accuracy
  • Document measurement methodology
  • Save raw data for comparison
  • Focus on metrics relevant to refactoring goals