Summary
cfs validate-toc enforces a toc-missing rule on every Markdown file with headings, and there is no way to disable or scope it. The command accepts only --max-level and --verbose; it reads no workspace/project config and has no --ignore, no require_toc=false, and no min-heading threshold.
This makes it impractical to run across a real docs tree, where small reference docs (e.g. a 3-heading installation.md) legitimately don't want a Table of Contents.
Steps to reproduce
cfs validate-toc docs/installation.md # 3 headings, no TOC
✗ {'code': 'toc-missing',
'message': 'Document has headings but no Table of Contents section', ...}
Running it over a whole docs/ tree flags every TOC-less file:
✗ 31 file(s) validated, 23 error(s) found.
All 23 are toc-missing — not malformed TOCs, just files that have no TOC by design.
Root cause
The rule is hardcoded in the validator (skills/studio/scripts/studio/utils/toc.py):
# 1. TOC exists?
if toc_info is None:
errors.append(error(
"toc",
"Document has headings but no Table of Contents section",
code=EC.TOC_MISSING,
...
))
The CLI command (commands/validate_toc.py) parses only files, --max-level, --verbose and reads no config.
Inconsistency with the validate pipeline
The artifact pipeline already has a gate for this — utils/constraints.py:
# Phase 1b: TOC validation (only when toc=true in constraints)
if getattr(constraints, "toc", True):
...
So a registered artifact can opt out via toc = false in the kit's constraints.toml, but the standalone cfs validate-toc command ignores that flag entirely and cannot be turned off.
Requested change
Give validate-toc an off-switch / scoping, consistent with how check-language already reads policy from workspace config. Any of:
- Workspace config under
[validation], e.g.
[validation]
require_toc = false # disable the toc-missing rule outright
toc_min_headings = 8 # only require a TOC past N headings
toc_ignore_paths = ["docs/reference/**", "**/README.md"]
- CLI flags mirroring
check-language: --ignore <glob> (repeatable) and a --no-require-toc / --min-headings N.
- At minimum, have the standalone command honor the same
toc = false constraint that the validate pipeline already respects.
Environment
- engine: v1.5.9
- kit sdlc: v1.2.1
- proxy: constructor-studio 0.1.dev1 (Python 3.14)
Summary
cfs validate-tocenforces atoc-missingrule on every Markdown file with headings, and there is no way to disable or scope it. The command accepts only--max-leveland--verbose; it reads no workspace/project config and has no--ignore, norequire_toc=false, and no min-heading threshold.This makes it impractical to run across a real docs tree, where small reference docs (e.g. a 3-heading
installation.md) legitimately don't want a Table of Contents.Steps to reproduce
cfs validate-toc docs/installation.md # 3 headings, no TOCRunning it over a whole
docs/tree flags every TOC-less file:All 23 are
toc-missing— not malformed TOCs, just files that have no TOC by design.Root cause
The rule is hardcoded in the validator (
skills/studio/scripts/studio/utils/toc.py):The CLI command (
commands/validate_toc.py) parses onlyfiles,--max-level,--verboseand reads no config.Inconsistency with the
validatepipelineThe artifact pipeline already has a gate for this —
utils/constraints.py:So a registered artifact can opt out via
toc = falsein the kit'sconstraints.toml, but the standalonecfs validate-toccommand ignores that flag entirely and cannot be turned off.Requested change
Give
validate-tocan off-switch / scoping, consistent with howcheck-languagealready reads policy from workspace config. Any of:[validation], e.g.check-language:--ignore <glob>(repeatable) and a--no-require-toc/--min-headings N.toc = falseconstraint that thevalidatepipeline already respects.Environment