Skip to content

Commit ba6d77c

Browse files
committed
Merge feature/doctor-health-score: add doctor health score (v1.6.1)
2 parents 883cdf0 + ebbeba7 commit ba6d77c

15 files changed

Lines changed: 944 additions & 86 deletions

File tree

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ pm run order-service
171171
- 🌿 **Git integration** - See branch, status, and unpushed commits in `pm info`
172172
- 🔧 **Environment variables** - Configure per-project variables (PORT, DEBUG, API_KEY, etc)
173173
- 🩺 **Runtime checker** - Detects missing runtimes before execution, shows install instructions
174-
- 🏥 **pm doctor** - Diagnose your environment: verify installed tools and validate project paths
174+
- 🏥 **pm doctor** - Diagnose your environment: verify installed tools, validate project paths, and get A–F health scores
175+
- 📊 **Health scores** - Project health grading (A/B/C/D/F) based on best practices (.gitignore, README, tests, CI, lockfile)
175176
- 🔄 **Auto-update** - Check for updates on startup, update with `pm update`
176177
- 🔃 **Project refresh** - Re-detect types and update commands with `pm refresh`, warns when projects are outdated
177178
- ✏️ **Rename & path update** - Rename projects or update paths with `pm rename`, preserving all data
@@ -243,7 +244,8 @@ chmod +x scripts/install.sh && ./scripts/install.sh
243244
| `pm refresh <name>` | Re-detect project type and update commands |
244245
| `pm refresh --all` | Refresh all registered projects |
245246
| `pm update` | Update to the latest version |
246-
| `pm doctor` | Diagnose environment (runtimes, paths) |
247+
| `pm doctor` | Diagnose environment (runtimes, paths, health scores) |
248+
| `pm doctor --score` | Show only health grades (A/B/C/D/F) per project |
247249
| `pm help` | Show help |
248250
| `pm version` | Show version |
249251

@@ -453,9 +455,9 @@ Projects are saved in:
453455
- **CLI**`pm doctor`, `pm env`, `pm refresh`, `pm rename`, `pm update`, `pm commands add/remove`
454456
- **Runtimes** — Gradle, Maven, Node.js, .NET, Python, Rust, Go, pnpm, Bun, Yarn, Flutter, Docker
455457
- **Integrations** — Git status, interactive TTY, multi-platform installers, GitHub Actions
456-
- **Reliability** — Atomic writes, backup/recovery, directory validation, download integrity, 402 tests
458+
- **Reliability** — Atomic writes, backup/recovery, directory validation, download integrity, 441 tests
457459

458-
> Latest release: **v1.6.0** (Shell Autocompletion) — Full version history in [ROADMAP.md](ROADMAP.md)
460+
> Latest release: **v1.6.1** (Doctor Health Score) — Full version history in [ROADMAP.md](ROADMAP.md)
459461
460462
### 💡 Future Ideas
461463
- [ ] `pm run-all` / `pm build-all` - Execute commands across all projects

ROADMAP.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,14 +183,21 @@ Run custom scripts automatically before or after any command. Hooks are per-proj
183183

184184
---
185185

186-
## v1.6.1 — Doctor Health Score
186+
## v1.6.1 — Doctor Health Score
187187

188188
### `pm doctor` expanded
189-
- Health score: **A/B/C/D/F** rating based on project best practices
190-
- Checks: `.gitignore` exists, README present, tests configured, CI detected, dependencies up to date
191-
- Actionable recommendations per check
192-
- `pm doctor` — show full health report with score
193-
- `pm doctor --score` — show only the letter grade
189+
190+
| Feature | Status |
191+
|---------|--------|
192+
| Health score: **A/B/C/D/F** rating based on project best practices | ✅ Done |
193+
| Check: `.gitignore` exists in project root | ✅ Done |
194+
| Check: README present (case-insensitive) | ✅ Done |
195+
| Check: Tests configured (`test` command exists) | ✅ Done |
196+
| Check: CI/CD detected (GitHub Actions, GitLab CI, Jenkins) | ✅ Done |
197+
| Check: Dependencies lockfile present (per project type) | ✅ Done |
198+
| Actionable recommendations per failed check | ✅ Done |
199+
| `pm doctor` — full report with health details per project | ✅ Done |
200+
| `pm doctor --score` — compact grade-only output | ✅ Done |
194201

195202
---
196203

User-Guide.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,32 @@ Run 'pm refresh my-project' to update
662662
pm doctor
663663
```
664664

665-
Verifies installed runtimes (Java, Node.js, .NET, Python, Gradle, Maven, Rust/Cargo, Go, pnpm, Bun, Yarn, Flutter) and validates all registered project paths.
665+
Verifies installed runtimes (Java, Node.js, .NET, Python, Gradle, Maven, Rust/Cargo, Go, pnpm, Bun, Yarn, Flutter), validates all registered project paths, and shows a **health report** for each project.
666+
667+
#### Health checks performed (per project)
668+
669+
| Check | Pass condition | Recommendation if failed |
670+
|-------|---------------|--------------------------|
671+
| `.gitignore` | File exists in project root | Create a .gitignore to exclude build artifacts |
672+
| README | `README.md` or `README` exists (case-insensitive) | Add a README.md to document your project |
673+
| Tests | Project has a `test` command configured | Configure tests with `pm commands add` |
674+
| CI/CD | GitHub Actions, GitLab CI, or Jenkinsfile detected | Set up CI/CD for automated testing |
675+
| Lockfile | Dependency lockfile exists for project type | Commit your lockfile for reproducible builds |
676+
677+
Each project receives a **letter grade** based on how many checks pass:
678+
- **A** = 5/5 — **B** = 4/5 — **C** = 3/5 — **D** = 2/5 — **F** = 0–1/5
679+
680+
#### Show only health grades (compact)
681+
```bash
682+
pm doctor --score
683+
```
684+
685+
Shows just the letter grade per project without details:
686+
```
687+
A backend
688+
B frontend
689+
F legacy-api
690+
```
666691

667692
---
668693

@@ -1610,7 +1635,8 @@ pm completions fish # Generate Fish completion script
16101635
pm completions powershell # Generate PowerShell completion script
16111636

16121637
# === DIAGNOSTICS ===
1613-
pm doctor # Check environment health
1638+
pm doctor # Full report: runtimes + project health (A-F)
1639+
pm doctor --score # Compact: only health grades per project
16141640

16151641
# === UPDATES ===
16161642
pm update # Update to latest version

docs/es/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ pm run servicio-pedidos
171171
- 🌿 **Integración Git** - Ve branch, status y commits sin pushear en `pm info`
172172
- 🔧 **Variables de entorno** - Configura variables por proyecto (PORT, DEBUG, API_KEY, etc)
173173
- 🩺 **Runtime checker** - Detecta runtimes faltantes antes de ejecutar, muestra instrucciones de instalación
174-
- 🏥 **pm doctor** - Diagnostica tu entorno: verifica herramientas instaladas y valida rutas de proyectos
174+
- 🏥 **pm doctor** - Diagnostica tu entorno: verifica herramientas instaladas, valida rutas de proyectos y muestra puntuaciones de salud A–F
175+
- 📊 **Puntuación de salud** - Calificación de salud del proyecto (A/B/C/D/F) basada en buenas prácticas (.gitignore, README, tests, CI, lockfile)
175176
- 🔄 **Auto-actualización** - Comprueba actualizaciones al arrancar, actualiza con `pm update`
176177
- 🔃 **Refrescar proyectos** - Re-detecta tipos y actualiza comandos con `pm refresh`, avisa cuando los proyectos están desactualizados
177178
- ✏️ **Renombrar y actualizar ruta** - Renombra proyectos o actualiza rutas con `pm rename`, preservando todos los datos
@@ -243,7 +244,8 @@ chmod +x scripts/install.sh && ./scripts/install.sh
243244
| `pm refresh <nombre>` | Re-detectar tipo de proyecto y actualizar comandos |
244245
| `pm refresh --all` | Refrescar todos los proyectos registrados |
245246
| `pm update` | Actualizar a la última versión |
246-
| `pm doctor` | Diagnosticar entorno (runtimes, rutas) |
247+
| `pm doctor` | Diagnosticar entorno (runtimes, rutas, puntuación de salud) |
248+
| `pm doctor --score` | Mostrar solo calificaciones de salud (A/B/C/D/F) por proyecto |
247249
| `pm help` | Mostrar ayuda |
248250
| `pm version` | Mostrar versión |
249251

@@ -453,9 +455,9 @@ Los proyectos se guardan en:
453455
- **CLI**`pm doctor`, `pm env`, `pm refresh`, `pm rename`, `pm update`, `pm commands add/remove`
454456
- **Runtimes** — Gradle, Maven, Node.js, .NET, Python, Rust, Go, pnpm, Bun, Yarn, Flutter, Docker
455457
- **Integraciones** — Estado Git, TTY interactivo, instaladores multi-plataforma, GitHub Actions
456-
- **Fiabilidad** — Escritura atómica, backup/recuperación, validación de directorio, integridad de descarga, 402 tests
458+
- **Fiabilidad** — Escritura atómica, backup/recuperación, validación de directorio, integridad de descarga, 441 tests
457459

458-
> Última release: **v1.6.0** (Autocompletado en Shell) — Historial completo en [ROADMAP.md](ROADMAP.md)
460+
> Última release: **v1.6.1** (Puntuación de Salud del Doctor) — Historial completo en [ROADMAP.md](ROADMAP.md)
459461
460462
### 💡 Ideas Futuras
461463
- [ ] `pm run-all` / `pm build-all` - Ejecutar comandos en todos los proyectos

docs/es/ROADMAP.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,14 +183,21 @@ Ejecuta scripts personalizados automáticamente antes o después de cualquier co
183183

184184
---
185185

186-
## v1.6.1 — Puntuación de Salud del Doctor
186+
## v1.6.1 — Puntuación de Salud del Doctor
187187

188188
### `pm doctor` ampliado
189-
- Puntuación de salud: calificación **A/B/C/D/F** basada en buenas prácticas del proyecto
190-
- Verificaciones: `.gitignore` existe, README presente, tests configurados, CI detectado, dependencias actualizadas
191-
- Recomendaciones accionables por verificación
192-
- `pm doctor` — mostrar reporte completo con puntuación
193-
- `pm doctor --score` — mostrar solo la calificación
189+
190+
| Funcionalidad | Estado |
191+
|---------------|--------|
192+
| Puntuación de salud: calificación **A/B/C/D/F** basada en buenas prácticas | ✅ Hecho |
193+
| Verificación: `.gitignore` existe en la raíz del proyecto | ✅ Hecho |
194+
| Verificación: README presente (sin distinción de mayúsculas) | ✅ Hecho |
195+
| Verificación: Tests configurados (comando `test` existe) | ✅ Hecho |
196+
| Verificación: CI/CD detectado (GitHub Actions, GitLab CI, Jenkins) | ✅ Hecho |
197+
| Verificación: Lockfile de dependencias presente (por tipo de proyecto) | ✅ Hecho |
198+
| Recomendaciones accionables por verificación fallida | ✅ Hecho |
199+
| `pm doctor` — reporte completo con detalles de salud por proyecto | ✅ Hecho |
200+
| `pm doctor --score` — salida compacta solo con calificaciones | ✅ Hecho |
194201

195202
---
196203

docs/es/User-Guide.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,32 @@ Run 'pm refresh mi-proyecto' to update
662662
pm doctor
663663
```
664664

665-
Verifica runtimes instalados (Java, Node.js, .NET, Python, Gradle, Maven, Rust/Cargo, Go, pnpm, Bun, Yarn, Flutter) y valida las rutas de todos los proyectos registrados.
665+
Verifica runtimes instalados (Java, Node.js, .NET, Python, Gradle, Maven, Rust/Cargo, Go, pnpm, Bun, Yarn, Flutter), valida las rutas de todos los proyectos registrados y muestra un **reporte de salud** por cada proyecto.
666+
667+
#### Verificaciones de salud (por proyecto)
668+
669+
| Verificación | Condición para pasar | Recomendación si falla |
670+
|-------------|---------------------|----------------------|
671+
| `.gitignore` | El archivo existe en la raíz del proyecto | Crea un .gitignore para excluir artefactos de build |
672+
| README | `README.md` o `README` existe (sin distinción de mayúsculas) | Añade un README.md para documentar tu proyecto |
673+
| Tests | El proyecto tiene un comando `test` configurado | Configura tests con `pm commands add` |
674+
| CI/CD | GitHub Actions, GitLab CI o Jenkinsfile detectado | Configura CI/CD para testing automatizado |
675+
| Lockfile | Lockfile de dependencias existe para el tipo de proyecto | Commitea tu lockfile para builds reproducibles |
676+
677+
Cada proyecto recibe una **calificación** basada en cuántas verificaciones pasa:
678+
- **A** = 5/5 — **B** = 4/5 — **C** = 3/5 — **D** = 2/5 — **F** = 0–1/5
679+
680+
#### Mostrar solo calificaciones (compacto)
681+
```bash
682+
pm doctor --score
683+
```
684+
685+
Muestra solo la nota por proyecto sin detalles:
686+
```
687+
A backend
688+
B frontend
689+
F legacy-api
690+
```
666691

667692
---
668693

@@ -1610,7 +1635,8 @@ pm completions fish # Generar script para Fish
16101635
pm completions powershell # Generar script para PowerShell
16111636

16121637
# === DIAGNÓSTICOS ===
1613-
pm doctor # Verificar salud del entorno
1638+
pm doctor # Reporte completo: runtimes + salud (A-F)
1639+
pm doctor --score # Compacto: solo calificaciones por proyecto
16141640

16151641
# === ACTUALIZACIONES ===
16161642
pm update # Actualizar a última versión

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<!-- Identificación del proyecto -->
99
<groupId>pm</groupId>
1010
<artifactId>projectmanager</artifactId>
11-
<version>1.6.0</version>
11+
<version>1.6.1</version>
1212
<packaging>jar</packaging>
1313

1414
<name>ProjectManager</name>

scripts/install.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ProjectManager - Installation Script for Windows
22
# Works both from source (mvn clean package) and from GitHub Release download
33

4-
$jarName = "projectmanager-1.6.0.jar"
4+
$jarName = "projectmanager-1.6.1.jar"
55

66
Write-Host "=== ProjectManager Installer ===" -ForegroundColor Cyan
77
Write-Host ""

scripts/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# ProjectManager - Installation Script for Linux/Mac
33
# Works both from source (mvn clean package) and from GitHub Release download
44

5-
JAR_NAME="projectmanager-1.6.0.jar"
5+
JAR_NAME="projectmanager-1.6.1.jar"
66

77
echo "=== ProjectManager Installer ==="
88
echo ""

0 commit comments

Comments
 (0)