A tool that checks the consistency of a repository would be pretty much essential for a production deployment of modeshape when configured to persist large repositories (not so important for in-memory transient repositories).
This came to mind with reference to
MODE-1623 which ends up with a corrupted persisted repository from which there is no way to recover without restoring from a backup.
My largest current site (simple file based store, not JCR) is over 44M documents using 12TB of storage. Restoring that from a backup is no easy matter.
A tool should have similar features to the unix fsck(8) utility and maybe some from the debugfs(8) command as well to enable examination and repair of more difficult problems. (http://linux.die.net/man/8/e2fsck, http://linux.die.net/man/8/debugfs)