 : contains-dot? ( string -- ? ) ".." swap subseq? ;
 
 : contains-separator? ( string -- ? ) [ path-separator? ] any? ;
+
+: ensure-vocab-exists ( string -- string )
+    dup vocabs member? [ no-vocab ] unless ;
 
 : check-vocab-name ( string -- string )
     [ ]

PRIVATE>

: scaffold-tests ( vocab -- )
    dup "-tests.factor" vocab/suffix>path
    scaffolding? [
        set-scaffold-tests-file

    [ (help.) ] [ nl vocabulary>> link-vocab ] bi ;

: scaffold-help ( vocab -- )
    ensure-vocab-exists
    [
        dup "-docs.factor" vocab/suffix>path scaffolding? [
            set-scaffold-docs-file
