Gotchas: hbf-developer-docs
Package-specific non-obvious patterns and pitfalls. Loaded on demand when working on this package.
- Docusaurus v3 SSG crashes on symlinked
.mdfiles: Must copy, not symlink, source docs into the Docusaurus tree. - Architecture diagrams use
flowchart LR/TDonly: C4 syntax was removed from all repos.patch-mermaid-clicks.tsnow only runsaddFlowchartClicks(C4 code removed). - Mermaid container class is
.docusaurus-mermaid-container:@docusaurus/theme-mermaidrenders diagrams indiv.docusaurus-mermaid-container(NOT.mermaid). The.mermaidclass does not exist in the DOM. Any client-side code targeting Mermaid SVGs must use.docusaurus-mermaid-container. @docusaurus/theme-mermaidmust be in thethemesarray: Notplugins. Missing it causes diagrams to render as raw code blocks.securityLevel: 'loose'required: Needed in Mermaid config for click handlers in flowchart diagrams.- Source docs relative links break on relocation: Source docs from service repos have relative links (e.g.
../../docs/architecture/auth-flows.md) that break when relocated. Thesetup-symlinks.tscopy script rewrites these to absolute/docs/paths. docs/architecture/*.mdare gitignored: These are generated copies. Edit source files in the framework or service repos, not here.- Service index pages must be inside a folder: Use
docs/services/<name>/index.mdx(NOTdocs/services/<name>.mdx). A standalone.mdxat the sibling level causes duplicate sidebar entries. - Flow file slugs don't match filenames: Source doc slugs differ from actual filenames:
rag-knowledge-queryvsrag-query,live-chat-handovervslive-chat,broadcast-campaignvsbroadcast,analytics-ingestionvsanalytics. - GPG signing unavailable in Docker/CI: Use
-c commit.gpgsign=falsefor commits in those environments.