Activate Architect genie to perform codebase health scan and identify cleanup needs.
From genienpx claudepluginhub elmmly/genie-team --plugin genie/diagnoseDiagnoses compilation errors, runtime errors, performance issues, and analyzes logs in ADVPL/TLPP code from files, error messages, or Protheus log files. Outputs issues by severity, fixes, and preventive advice.
/diagnoseInitiates Dr. Ralph's multi-phase diagnostic workflow: interviews user on symptoms, researches via web, generates differential diagnosis, treatment plan, and SOAP report with running notes.
/diagnoseDiagnoses FilamentPHP v4 errors and issues by parsing descriptions, consulting docs, analyzing logs/caches/code, and providing root causes with code fixes.
/diagnoseSystematic debugging and refactor analysis. Diagnosis before prescription. Bug mode: reproduce, trace, isolate, hypothesize, diagnose. Refactor mode: map, trace deps, measure coupling, risks, diagnose.
/diagnoseComprehensive Neovim diagnostics - errors, keymap conflicts, performance issues
Activate Architect genie to perform codebase health scan and identify cleanup needs.
scope - Area to diagnose: module, directory, or "full" (optional, defaults to full)Architect - In diagnostic mode, focusing on:
READ (automatic):
WRITE:
UPDATE:
Produces a Diagnose Report containing:
/diagnose
> [Architect scans full codebase]
> Saved to docs/cleanup/20251203_diagnose_full.md
>
> Health: Moderate (score: 72/100)
>
> Issues found:
> - 5 dead functions (priority: low)
> - 3 unused imports (priority: low)
> - 1 pattern violation (priority: medium)
> - 2 outdated dependencies (priority: medium)
>
> Next: /tidy docs/cleanup/20251203_diagnose_full.md
/diagnose src/services
> [Architect scans services directory]
> Saved to docs/cleanup/20251203_diagnose_services.md
>
> Health: Good (score: 85/100)
> Minor issues only
| Metric | Weight | Description |
|---|---|---|
| Dead code | 15% | Unreachable functions, unused exports |
| Test coverage | 20% | Lines and branches covered |
| Pattern adherence | 20% | Following project conventions |
| Dependency health | 15% | Outdated, unused, vulnerable |
| Complexity | 10% | Cyclomatic complexity, nesting |
| Documentation | 10% | Public API documentation |
| Architecture | 10% | Coupling violations, cohesion drift, ADR health, diagram staleness |
When docs/architecture/ and/or docs/decisions/ directories exist, /diagnose performs architecture health checks. If neither directory exists, skip architecture analysis entirely and warn:
No architecture artifacts found. Architecture health analysis skipped.
docs/architecture/containers.md) and component diagrams (docs/architecture/components/*.md)Rel() arrows from Mermaid diagrams to build the declared dependency graph## Cohesion Assessment ratings — flag mismatchesdocs/decisions/proposed status with no recent /design activityaccepted ADRs with conflicting decisionssuperseded ADRs still referenced by active codeupdated field in each diagram's frontmatter## Architecture Health
### Coupling
- {N} documented dependencies, {M} undocumented found
- {finding description} — reference ADR-{NNN} for boundary rationale
### Cohesion
- {domain}: rated {RATING}, actual {assessment}
### ADR Status
- {N} accepted, {M} proposed (oldest: {date}), {K} superseded
### Diagram Staleness
- {diagram}: last updated {date} ({N} days ago) — STALE
After diagnosis:
/tidy with diagnose report