Filter

TwoAmTest

A teach-first filter that asks whether a tired engineer can still find, understand, and safely change the primary flow under pressure.

The question this filter asks

If a production incident lands at 2 AM, can someone trace the main path, reason about the code, and ship a fix without getting lost?

Shows up in

CLI watch output, HTML reports, and programmatic FilterVerdict evaluation.

Pass threshold

The overall verdict passes at the configured passingScore (0.70 by default).

Primary use

Diagnosability and incident response coaching.

Signals it scores

Each verdict combines several sub-scores so teams can see what is pulling the filter up or down.

Discoverability

Scores the number of primary-path files against a target of five or fewer.

Diagnosability

Scores average method complexity against a target of five or lower.

Fixability

Scores abstraction layers per project against a target ratio of three or lower.

Cognitive load

Scores estimated onboarding time against a target of roughly one work week (40 hours).

How to interpret the result

A low TwoAmTest score means the team is paying an incident-response tax before they even start fixing the actual defect.

  • If Discoverability drops, the primary path is spread across too many files.
  • If Diagnosability drops, the average method complexity is drifting too high for fast reasoning.
  • If Fixability drops, each project carries too many layers to edit confidently under pressure.
  • If Cognitive load drops, the solution shape is expensive for any new engineer to absorb.

What to do next when it drops

Filters are only useful if they drive a clear next move.

  • Collapse low-value abstraction layers around routine change paths.
  • Break large methods into smaller units until average complexity trends back toward five or lower.
  • Move the primary flow into fewer, more obvious files and annotate it explicitly when needed.

Related pages

Jump to the command or analyzer docs that typically trigger action from this filter.