[WIP] Implement line tracing for spec selection