INFERENCE-INIT-06: Move the cut with --depth
What it demonstrates
Section titled “What it demonstrates”–depth N groups contracts at exactly N directories deep, warning about files stranded above a depth-2+ cut.
Builds on: INFERENCE-INIT-04: Emit a corpus meta-config with –meta
How it’s done
Section titled “How it’s done”A terminal session: the command as you’d run it, followed by the output it prints; trailing comments note the exit status.
markdown-contract init ./docs --meta --depth 2# groups one contract per directory at depth 2, e.g.# contracts/api-v1.contract.yaml (api/v1/**/*.md)# contracts/web-v1.contract.yaml (web/v1/**/*.md)# files between the root and the cut are stranded and reported:# warning: stranded: api/overview.md sits above the --depth 2 cut and is# covered by no contract; use a shallower --depth to include itSurfaces exercised
Section titled “Surfaces exercised”InferOptions.depthinferMeta ancestorAt groupingfull-path slug naming (nameForDir)stranded-file warnings