| name | diagnose |
| description | Diagnose issues from logs, traces, or runtime symptoms with OpenSpec and repository docs as source of truth. Use when debugging defects, validating incident hypotheses, or preparing a fix plan. |
| license | MIT |
| compatibility | Requires repository access and OpenSpec artifacts. |
| metadata | {"author":"entservices-maintenancemanager","version":"1.0"} |
Diagnose issues using an OpenSpec-first, code-truth workflow.
Use Cases
- Service failures during maintenance lifecycle
- Unexpected JSON-RPC behavior
- IARMBus event-order or completion-state anomalies
- Timeout, abort, or stuck-thread symptoms
- Regression triage after a recent change
Inputs
Any subset is acceptable:
- Logs or log snippets
- Error messages
- Reproduction steps
- Suspected commit/change area
- Device/runtime context
Source of Truth Order
- OpenSpec artifacts in openspec/
- Repository docs
- Code and tests
- User-provided assumptions
Workflow
- Identify scope and affected subsystem.
- Gather evidence from logs, code, and tests.
- Reconstruct timeline and state transitions.
- Map findings against intended behavior from OpenSpec/docs.
- Classify each statement as Fact, Inference, Assumption, or Unknown.
- Provide root cause hypothesis with confidence level.
- Recommend remediation options (minimal-risk first).
- Propose OpenSpec/documentation updates if drift is found.
Output Template
- Problem summary
- Impact scope
- Evidence table
- Root cause analysis
- Remediation options
- Recommended fix path
- Validation checklist
- OpenSpec/docs sync actions
Guardrails
- Do not jump to conclusions without evidence.
- Explicitly separate confirmed behavior from assumptions.
- Keep OpenSpec aligned with diagnosis outcome.
- Prefer reproducible, testable hypotheses.