| name | diagnose |
| description | Disciplined diagnosis loop for meminsight parser bugs, runtime failures, and regressions using deterministic fixture-first feedback. |
Diagnose
Purpose
Debug meminsight issues through a strict loop:
- Reproduce
- Minimize
- Hypothesize
- Instrument
- Fix
- Regression test
Meminsight-specific rules
- Start from deterministic repro whenever possible using test fixtures in test/.
- Validate behavior against impacted OpenSpec capability files in openspec/specs.
- Prefer parser-focused probes over broad logging.
- Keep temporary debug instrumentation clearly tagged and removable.
- Confirm CSV compatibility and optional JSON fallback behavior after fix.
Suggested workflow
- Create a fast pass/fail loop using
sh test/run_ut.sh or targeted --test fixture runs.
- Capture 3 to 5 ranked hypotheses before modifying production code.
- Add narrow instrumentation for one hypothesis at a time.
- Implement minimal fix.
- Add or update fixture coverage for regression protection.
- Re-run the original reproduction path and tests.
Exit criteria
- Original bug path no longer reproduces.
- New or updated fixture-based check passes.
- Added debug instrumentation is removed.
- OpenSpec capability docs remain accurate for touched behavior.