V1 plan — Make validate all mean every declared collection
State: open. The skill and command reference now agree, but both use the
same one-level kb/*/COLLECTION.md loop. A current clean install contains seven
contracts and that glob sees four; it misses all three shipped library
collections.
Resolution selected
Make commonplace-validate all the sole implementation of full deterministic
validation. The Python command should discover scopes recursively, validate
each collection separately, cover type specs outside collections exactly once,
continue after failures, run repository-level checks once, print an aggregate
summary, and return nonzero after the complete sweep if any phase failed.
Work
- Resolve I3's collection definition. Refactor
collection_dirs()or add a validation-specific wrapper so enumeration: - includes namespace-nested and global-type collections;
- prunes subtrees beneath
.commonplace-validation-ignore; - schedules only a visible collection root with no collection ancestor,
leaving an ancestor's structure check to report a non-ignored nested
COLLECTION.md; - returns deterministic repository-relative paths.
- Add an internal all-runner to
validate_notes.py. Pass full paths such askb/commonplace/notes, never basenames that collide with user collections. Preserve each collection as its ownValidationRunso collection-local tag, type, and structure rules retain the correct boundary. - Do not fail fast. Accumulate collection results, ignored scopes, warnings, failures, and execution errors, then render one final scope ledger showing every discovered collection exactly once.
- After collection runs, validate type specs not already covered by a
scheduled collection exactly once. Preserve the current
typescoverage of support roots such askb/reports/types/andkb/tasks/types/; report this phase separately so broader collection discovery cannot create duplicates. - Run the existing top-level landing check once; do not silently broaden its
direct-child-of-
kb/contract to nested library collections. Decide and document whether redirects are part ofall; the recommended behavior is to run them once whenproperdocs.ymlexists and record “not applicable” when it does not. - Replace the shell programs in
cp-skill-validateandcommands.mdwith the single portable invocation. Remove the CLI's explicit rejection ofalland update help and failure text.
Tests
- Source layout and pristine installed layout.
- User and shipped collections with the same basename.
- A namespace-nested collection and a validation-ignored nested fixture.
- The I3 disposition of
kb/types/and collection-local type specs. - Report/task type specs outside collections, with exact-once coverage.
- Exact-once execution and deterministic order.
- A failing early collection followed by a later collection that is still run.
- Landing and conditional redirect phases.
The current fixture's seven contracts are a regression witness, not the future hardcoded answer: I2 and I3 may add collections. V1 closes when the invoked set always equals the discovered declared set and the promoted skill is a shell-neutral one-command wrapper.