Skip to content

Make capabilities/diataxis frontmatter a failing check - #5394

Merged
Jeremy Rose (jeremyrose-viam) merged 1 commit into
mainfrom
claude/docs-health-guardrails-4ecf23
Oct 7, 2026
Merged

Jeremy Rose (jeremyrose-viam) merged 1 commit into
mainfrom
claude/docs-health-guardrails-4ecf23

Conversation

@elizafarley

Copy link
Copy Markdown
Contributor

Why

The docs-health metrics build fails its sanity check, leaving the dashboard stale, whenever a published page is missing capabilities: or diataxis:. That happened twice recently:

The docs check caught both, but only as warnings.

What changes

  • One failing check. scripts/frontmatter_rules.py replaces check-capabilities.py and check-diataxis.py. It exits 1 on any missing or invalid value and puts an ::error annotation on each failing file, with a fix hint in the message.
  • Same rules as docs-health. Drafts are excluded by draft: true instead of a hardcoded template list, and glossary pages by the glossary tag instead of their path, matching docs-health's partition_corpus. The unexcluded set is 422 pages, the same count as docs-health's last good run. A follow-up docs-health PR will import this module instead of keeping its own copy.
  • No more silent skips. Missing, unclosed, or invalid frontmatter and a non-list capabilities: now fail with a clear message.
  • Workflow runs on every PR. I removed the paths: filter so the job can be a required status check, and so edits to data/*.yaml are checked too.
  • Templates carry placeholder capabilities:/diataxis: fields, so copied pages start with both fields.
  • CLAUDE.md documents the rules and adds a note for agents: new capability tags or Diataxis modes are allowed, but each needs a matching viamrobotics/docs-health PR, merged together.

Testing

  • Passes on the current tree (542 files).
  • Fails on the pre-fix versions of both incident pages, and on synthetic cases: string capabilities:, list diataxis:, unclosed frontmatter, draft: "false". CRLF frontmatter is accepted.
  • prettier 3.2.5, markdownlint, vale 3.12.0, and make build-prod all pass.

After merge

A repo admin needs to mark Check docs/ capability and Diataxis frontmatter as a required status check on main. Without that, a failing check still doesn't block a merge.

🤖 Generated with Claude Code

The docs-health daily metrics build failed seven times in two incidents
(Sep 26-28, Oct 3-6) because PRs merged pages missing capabilities: or
diataxis:. The docs check flagged both, but only as warnings.

- Replace check-capabilities.py and check-diataxis.py with one
  importable scripts/frontmatter_rules.py that exits 1 on any missing or
  invalid value and annotates each failing file. docs-health will import
  its exclusion rules instead of keeping its own copy.
- Align exclusions with docs-health: draft: true replaces the hardcoded
  template list, and glossary is detected by tag rather than path. The
  unexcluded corpus is 422 pages, matching docs-health's last good run.
- Fail on unreadable frontmatter (missing, unclosed, invalid YAML) and
  on a non-list capabilities: instead of skipping or misreporting.
- Drop the workflow's paths: filter so it can be a required check.
- Add placeholder fields to the tutorial templates.
- Document the rules in CLAUDE.md, including that new capability tags or
  Diataxis modes need a matching docs-health PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@netlify

netlify Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for viam-docs ready!

Name Link
🔨 Latest commit b5fb8c1
🔍 Latest deploy log https://app.netlify.com/projects/viam-docs/deploys/6ac55a582f791500084edc78
😎 Deploy Preview https://deploy-preview-5394--viam-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 43 (🟢 up 8 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@viambot viambot added the safe to build This pull request is marked safe to build from a trusted zone label Oct 6, 2026
@jeremyrose-viam
Jeremy Rose (jeremyrose-viam) merged commit f41236b into main Oct 7, 2026
15 checks passed
@jeremyrose-viam
Jeremy Rose (jeremyrose-viam) deleted the claude/docs-health-guardrails-4ecf23 branch October 7, 2026 20:53
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

🔎💬 Inkeep AI search and chat service is syncing content for source 'Viam Docs'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to build This pull request is marked safe to build from a trusted zone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants