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?
CLI watch output, HTML reports, and programmatic FilterVerdict evaluation.
The overall verdict passes at the configured passingScore (0.70 by default).
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.
Scores the number of primary-path files against a target of five or fewer.
Scores average method complexity against a target of five or lower.
Scores abstraction layers per project against a target ratio of three or lower.
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.
watch
The live watch view prints TwoAmTest verdicts after every meaningful file change.
AnalyzerSF0003
High method complexity is one of the clearest reasons a TwoAmTest score drops.
AnalyzerSF0005
Bloated constructors are another strong signal that fixing code will be harder than it should be.