Add a check (a.k.a. lint/validate) subcommand that runs the converter on one or more markdown FILEs and reports problems without any network access or credentials — fast, safe, and CI/agent-friendly.
Why
This is the primitive an agent (Claude Code) or a pre-commit/CI loop wants: validate every doc edit instantly, offline, with no risk of mutating Confluence. Distinct from --dry-run (#11), which still contacts the server — create's validation calls ResolveSpaceID/PageExists/SearchPagesByTitle, so dry-run needs creds and a live space. check should need neither.
What it does
Run convert.MdToConfluence on each file and report:
- conversion
warnings and broken image/link notices (already surfaced by the converter),
- frontmatter sanity (parseable;
page_width ∈ narrow/wide/max; required fields present for the intended operation),
- local image/attachment paths that don't resolve on disk.
No client.Resolve, no HTTP. Composes with the existing --json envelope (a per-file result carrying warnings/broken), and exits non-zero if any file has errors.
Notes
- Base URL / space are needed by the converter for link rewriting; accept them as flags with harmless defaults (like the regression suite's
https://wiki.example.net / ENG) so no live lookup is required.
- Reuses the
internal/convert + warning/broken plumbing that already exists; mostly a thin command wrapper.
- Improves markfluence's use inside Claude Code: an agent can validate before it ever tries to publish.
Add a
check(a.k.a. lint/validate) subcommand that runs the converter on one or more markdown FILEs and reports problems without any network access or credentials — fast, safe, and CI/agent-friendly.Why
This is the primitive an agent (Claude Code) or a pre-commit/CI loop wants: validate every doc edit instantly, offline, with no risk of mutating Confluence. Distinct from
--dry-run(#11), which still contacts the server —create's validation callsResolveSpaceID/PageExists/SearchPagesByTitle, so dry-run needs creds and a live space.checkshould need neither.What it does
Run
convert.MdToConfluenceon each file and report:warningsandbrokenimage/link notices (already surfaced by the converter),page_width∈ narrow/wide/max; required fields present for the intended operation),No
client.Resolve, no HTTP. Composes with the existing--jsonenvelope (a per-file result carryingwarnings/broken), and exits non-zero if any file has errors.Notes
https://wiki.example.net/ENG) so no live lookup is required.internal/convert+ warning/broken plumbing that already exists; mostly a thin command wrapper.