DocGuard v0.25.0
Field-report follow-up from dogfooding v0.24.0 on a real stdlib-only Python CLI
(websec-validator). Fixes the bugs that bit a first run and adds CLI/library
ergonomics. The headline is a silent .docguardignore failure: a gitignore-style
dir/ pattern matched nothing, so "ignored" directories were still scanned.
Fixed
.docguardignorehonorsdir/patterns — a trailing-slash directory
pattern (tests/,base-research/) silently matched nothing, so every
shouldIgnore/buildIgnoreFilterconsumer kept scanning the directory.
globToRegexnow normalizes the trailing slash sodir,dir/, anddir/**
behave identically. Security-relevant: an excluded secret-bearing directory is
now actually excluded. (B1a)project-typeframework detection honors ignore — the manifest walk now
skips ignored dirs, so a fixturepackage.json/requirements.txtunder
tests/no longer misclassifies the stack (e.g. a CLI reported as "Express,
Flask"). (B1b)generate --writeno longer crashes (ENOENT) — the--plan --writeloop
created onlydocs-canonical/, then crashed writing the first
docs-implementation/doc. It now creates each parent directory and snapshots
a.bak. (B2)init --fixworks headless —--fixwas documented ("auto-create missing
files from templates") but read nowhere, so it dropped into an interactive
prompt and failed with no TTY. It now creates missing required docs
non-interactively. (B3)generate --planhas no side effects — a bare--planpreview triggered
ensureSkills, scaffolding.agent/and.specify/into the tree.--plan
is now treated as a read-only preview. (B4)- Generator/validator agreement —
generateregisters the canonical docs it
emits in.docguard.jsonrequiredFiles, soguardno longer flags the
generator's own output as an unlinked doc. (B7)
Added
pinnedsection marker — addpinned="reason"to a
<!-- docguard:section … -->marker to exempt an intentionally hand-maintained
source=codesection from Generated-Staleness, and stopsync --writefrom
reverting it. (B5)- Per-command help —
docguard <command> --helplists that command's own
flags and examples (e.g.generate --plan --write,init --skeleton). (B6) - Low-confidence surface flag — for
cli/library/unknown-kind projects,
generate --planflags auto-extracted HTTP/SDK/route surface as low-confidence
(it may be pattern-strings in a scanner/tool's own source, not real usage). It
is flagged, never suppressed;--plan --format jsongainssurface.confidence. (F1) cliandlibraryprofiles — non-web-centric required-doc sets, so a CLI
or library isn't forced into HTTP-API/database doc shape. (F3)