Skip to content

qm-hamiltonian-descent

Domain: qm · Model class: strong

Use this skill when you need to determine the optimal order in which to fix code quality issues across modules. Trigger phrases include: “what should I fix first”, “optimal fix order”, “module penalty ranking”, “ground state of codebase”, “energy eigenvalues of quality”, “lowest energy module”. This skill builds a diagonal quality Hamiltonian and sorts eigenvalues ascending to find the optimal fix order. Do NOT use when you need prioritisation by business impact rather than code quality metrics.

qm-hamiltonian-descent maps each module’s code-quality metrics onto a diagonal quantum Hamiltonian. The energy eigenvalue is E = 1 − penalty, so the module with the highest penalty has the lowest energy — making it the true quantum ground state E₀. This matches QM convention: the ground state is the energy minimum that systems naturally relax toward. Codebases similarly decay toward their worst quality state without active intervention. The skill ranks modules in ascending energy order (ground state first), computes the spectral gap, classifies priority, and provides a repair vector for each module pointing from its current energy toward the ensemble mean.

  • “qm-hamiltonian-descent”
  • Prioritisation must be driven by business impact, customer severity, or SLA.
  • Modules lack any measurable quality metrics (complexity, coupling, coverage, churn).
  1. Apply the qm-hamiltonian-descent skill to the user request.
  • physics metaphor output
  • plain-language engineering translation
  • confidence and limitation notes
  • recommended engineering action

None