Files
gps-denied-onboard/.cursor/skills/refactor/phases/00-baseline.md
T
Oleksandr Bezdieniezhnykh 1f634c2604
ci/woodpecker/push/02-build-push Pipeline failed
Update demo replay validation and testing documentation
- Modified the autodev state to reflect the current testing phase and details of the new `jetson-e2e` tests.
- Enhanced the "How to Test" documentation to provide clearer instructions on the demo replay validation process, including video and tlog alignment steps.
- Updated architectural documentation to include the new demo replay operator flow and its dependencies.
- Documented the removal of deprecated auto-sync features and clarified the operator-facing UI for replay validation.
- Added new entries in the dependencies table for upcoming tasks related to the demo replay flow.

These changes improve clarity and usability for operators and developers working with the demo replay system.
2026-06-20 11:24:43 +03:00

2.1 KiB

Phase 0: Context & Baseline

Role: Software engineer preparing for refactoring Goal: Collect refactoring goals, create run directory, capture baseline metrics Constraints: Measurement only — no code changes

0a. Collect Goals

If PROBLEM_DIR files do not yet exist, help the user create them:

  1. problem.md — what the system currently does, what changes are needed, pain points
  2. acceptance_criteria.md — success criteria for the refactoring
  3. security_approach.md — security requirements (if applicable)

Store in PROBLEM_DIR.

0b. Create RUN_DIR

  1. Scan REFACTOR_DIR for existing NN-* folders
  2. Auto-increment the numeric prefix (e.g., if 01-testability-refactoring exists, next is 02-...)
  3. Determine the run name:
    • If guided mode with input file: derive from input file name or context (e.g., 01-testability-refactoring)
    • If automatic mode: ask user for a short run name, or derive from goals (e.g., 01-coupling-refactoring)
  4. Create REFACTOR_DIR/NN-[run-name]/ — this is RUN_DIR for the rest of the workflow

Announce RUN_DIR path to user.

0c. Capture Baseline

  1. Read problem description and acceptance criteria
  2. Measure current system metrics using project-appropriate tools:
Metric Category What to Capture
Coverage Overall, unit, blackbox, critical paths
Complexity Cyclomatic complexity (avg + top 5 functions), LOC, tech debt ratio
Code Smells Total, critical, major
Performance Response times (P50/P95/P99), CPU/memory, throughput
Dependencies Total count, outdated, security vulnerabilities
Build Build time, test execution time, deployment time
  1. Create functionality inventory: all features/endpoints with status and coverage

Self-verification:

  • RUN_DIR created with correct auto-incremented prefix
  • All metric categories measured (or noted as N/A with reason)
  • Functionality inventory is complete
  • Measurements are reproducible

Save action: Write RUN_DIR/baseline_metrics.md

BLOCKING: Present baseline summary to user. Do NOT proceed until user confirms.