Skip to content

docs: scaffold Trace FX developer documentation#1

Merged
marioalvial merged 11 commits intomainfrom
docs/scaffold-trace-fx-docs
Apr 14, 2026
Merged

docs: scaffold Trace FX developer documentation#1
marioalvial merged 11 commits intomainfrom
docs/scaffold-trace-fx-docs

Conversation

@marioalvial
Copy link
Copy Markdown
Contributor

@marioalvial marioalvial commented Apr 14, 2026

Summary

  • Removes Mintlify starter-kit content (ai-tools, essentials, api-reference examples)
  • Scaffolds the Trace FX documentation structure: guides, journeys, webhooks, snippets
  • Adds a dual-layer quality system (evals + hooks + CI) adapted from the trace-knowledge-base vault
  • Establishes terminology, conventions, and contribution rules

What's included

Documentation structure

  • Single-tab navigation (Guides): getting started, API principles, journeys, webhooks
  • 16 stub MDX pages with frontmatter — ready for content authoring
  • 7 reusable snippets: auth-header, sandbox-note, idempotency-note, pagination-response, error-response, money-format, version-header
  • Updated docs.json: SEO metadata, WCAG-compliant colors, search config, last-updated dates

OpenAPI specs (deferred from navigation)

  • apis/fx-account/openapi.yml — 1 fully specified endpoint (GET /api/accounts/{accountId})
  • apis/fx-payment/openapi.yml — 13 endpoint scaffolds awaiting request/response schemas
  • Not wired into docs.json navigation — the API Reference tab will be added when schemas are fleshed out

Quality system

  • 6 evals: frontmatter-completeness, content-depth, description-quality, orphan-detector, navigation-coverage, openapi-completeness
  • 3 PostToolUse hooks: validate-frontmatter (blocking), validate-body-sections (warning), check-description (warning)
  • 8 page-type templates defining required sections
  • GitHub Actions CI: mint validate + broken-links + a11y + markdownlint + gated eval thresholds
  • /evaluate skill for running evals from Claude Code

Rules & conventions

  • CLAUDE.md and CONTRIBUTING.md with terminology (customer vs account owner), style rules, drift prevention, and page-adding workflows

Changes during review

  • Removed freshness-checker eval (irrelevant for a docs site with varying update cadences)
  • Deferred API Reference tab until OpenAPI schemas are ready (stub endpoints broke mint validate)
  • Removed openapi-completeness CI job (re-add when API Reference tab returns)
  • Fixed seo.indexing typo ("navigated""navigable")
  • Fixed broken link in error-response snippet (pointed to deleted reference page)
  • Fixed primary color for WCAG AA compliance (#16A34A#15803D, 3.30:1 → 5.02:1)

Test plan

  • All CI checks pass (mint validate, broken-links, a11y, markdownlint, evals)
  • Structural evals pass at 100% (frontmatter, descriptions, orphans, navigation coverage)
  • No broken links (Mintlify link-rot check passes)
  • Primary color passes WCAG AA contrast requirements

Removes example pages (ai-tools, essentials, api-reference, development),
placeholder snippets, and AGENTS.md to make room for Trace FX docs.
New folder layout: guides/, journeys/, webhooks/, reference/, apis/.
OpenAPI specs for fx-account (scoped to /api) and fx-payment (scaffold).
7 reusable snippets, updated docs.json with two-tab nav (Guides + API
Reference), SEO metadata, and base URLs. CLAUDE.md and CONTRIBUTING.md
with terminology, rules, and conventions.
Dual-layer validation adapted from trace-knowledge-base vault:
- 7 evals: frontmatter, content-depth, descriptions, orphans,
  navigation coverage, freshness, OpenAPI completeness
- 3 PostToolUse hooks: frontmatter validation (blocking),
  body section template check (warning), description quality (warning)
- 8 page-type templates defining required sections
- /evaluate skill for running evals
- GitHub Actions CI pipeline (mint build, broken-links, accessibility,
  markdownlint, gated eval thresholds)
- Shared Python library (_lib.py) for evals and hooks
@mintlify
Copy link
Copy Markdown

mintlify bot commented Apr 14, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
tracefinance 🔴 Failed Apr 14, 2026, 12:53 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

- mint build -> mint validate (build is not a valid CLI command)
- mint accessibility -> mint a11y (correct alias)
- Disable MD037 (false positives from MDX comment syntax)
- Disable MD007, MD032 (MDX comments with indented lists)
- Lower openapi-completeness threshold to 0 for scaffold phase
- Re-enable MD007 and MD032 markdownlint rules; fix the actual cause
  (indented list inside MDX comment in errors-catalog.mdx)
- OpenAPI completeness: restore 50% threshold, use continue-on-error
  so the check reports score without blocking PRs during scaffold phase
Hooks were defining their own copies of FRONTMATTER_RE, PLACEHOLDER_PATTERNS,
PAGE_TYPE_RULES, and parsing functions. This caused maintenance drift risk and
a bug in validate-body-sections.py where infer_type() hardcoded "api-docs" in
the path, breaking page type inference when the repo is cloned elsewhere.

- Extract load_hook_input() and abs_to_rel() helpers into _lib.py
- Rewrite all 3 hooks to import from _lib.py (net -64 lines)
- Fix hardcoded path: use REPO_ROOT-based abs_to_rel() + infer_page_type()
- Narrow bare except in freshness-checker.py to (OSError, ValueError)
- Add missing example: {} to fx-payment ErrorResponse.details for consistency
freshness-checker provides no useful signal — it trivially passes on new
pages and its 90-day global threshold doesn't fit docs with varying
update cadences. Removed the eval, its CLAUDE.md entry, and /evaluate
skill references.

Also fix docs.json seo.indexing: "navigated" is not a valid Mintlify
enum value — corrected to "navigable", which was breaking both the
Mintlify Deployment check and the CI build validation job.
Remove endpoint nav entries and reference overview pages from docs.json
— Mintlify can't generate pages from schema-less stub operations, which
was breaking mint validate with 14 warnings.

OpenAPI YAML files stay in apis/ for future use. The API Reference tab,
openapi config, and reference pages will be re-added when schemas are
fleshed out. Also removes the openapi-completeness CI job (no endpoint
pages to validate until the tab returns).
The errors-catalog reference page was removed when deferring the API
Reference tab. Point the snippet to guides/principles/errors instead.
Primary #16A34A fails WCAG AA contrast (3.30:1 vs 4.5:1 required).
Switch to #15803D (5.02:1) which passes AA and stays in the Trace
green family.
@marioalvial marioalvial merged commit 0188682 into main Apr 14, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant