Atomically precise tailoring of graphene can enable unusual transport pathways and new nanometer-scale functional devices. Here we describe a recipe for the controlled production of highly regular 5-5-8 line defects in graphene by means of simultaneous electron irradiation and Joule heating by applied electric current. High-resolution transmission electron microscopy reveals individual steps of the growth process. Extending earlier theoretical work suggesting valley-discriminating capabilities of a graphene 5-5-8 line defect, we perform first-principles calculations of transport and find a strong energy dependence of valley polarization of the charge carriers across the defect. These findings inspire us to propose a compact electrostatically gated valley valve device, a critical component for valleytronics.