Maintenanceprompt onlymedium

Monorepo Health Check

This loop performs a comprehensive health check of a monorepo by validating its structure, dependencies, code quality, and consistency. It iteratively identifies and resolves issues related to missing dependencies, outdated packages, lint errors, and architectural inconsistencies until the repository passes validation.

← all loops
monorepomaintenancecode-qualityautomationvalidation

Goal

Improve repository health

How to Run

Execute the loop to automatically detect and fix monorepo health issues. The agent will run validation checks, apply targeted fixes, and iterate up to 10 times until the repository meets health standards.

  1. 01

    Start the Loop

    Instruct the agent to begin the monorepo health check process.

  2. 02

    Monitor Iterations

    Observe the agent as it runs validation commands, identifies issues, and applies fixes.

  3. 03

    Review Final State

    Once the loop exits, review the final state and any remaining issues reported.

Workflow Steps

  1. 01

    Run repo validation command to check for health issues

    Use tools like 'nx show projects', 'lerna ls', or custom scripts to validate monorepo structure and configuration.

  2. 02

    Analyze validation output to identify issues

    Parse results to find problems such as missing dependencies, outdated packages, or code quality violations.

  3. 03

    Prioritize and categorize issues

    Group issues by severity (critical, warning) and type (dependency, code quality, documentation).

  4. 04

    Apply targeted fixes

    Run appropriate fix commands (e.g., 'npm install', 'nx format write', 'eslint --fix') based on identified issues.

  5. 05

    Re-run validation check

    After applying fixes, re-execute the repo validation command to verify improvements.

  6. 06

    Evaluate exit condition or iteration limit

    If validation passes, exit successfully. If max_iterations reached without pass, report remaining issues.

Kickoff Prompt

Start the "Monorepo Health Check" loop.

Goal: Improve repository health
Max iterations: 10
Between iterations run: repo validation
Exit when: Validation passes


Begin the monorepo health check loop. Run 'repo validation' to assess the current state, identify all critical and warning issues, and apply targeted fixes. Continue iterating up to 10 times, rechecking after each fix, until the repository passes validation. Prioritize issues that block builds or violate best practices. Do not make breaking changes—focus only on health improvements.

Self-pace this loop. After each iteration, run `repo validation` and evaluate the output, and only continue if the exit condition is not met (Validation passes). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.

Guardrails

hardcoded
  • ·Do not introduce breaking changes or major refactors.
  • ·Focus only on health-related improvements (linting, dependencies, documentation).
  • ·Avoid modifying application logic or business-critical code.
  • ·Ensure all changes are safe and revertible.
  • ·Stay within the monorepo's scope; do not modify external packages.
  • ·Do not run indefinitely—stop after max_iterations even if validation hasn't passed.

Flow Diagram

rendering…

Related loops — Maintenance