add initial spec and refactor repo.pp