Architecture Diagram Generator (hx-archify)
Relevant source files
The following files were used as context for generating this wiki page:
The Architecture Diagram Generator (hx-archify) is a specialized Agent Skill used to generate technical diagrams and architectural documentation within the HXLoLi repository. It transforms complex system descriptions and code structures into visual representations using Mermaid syntax to ensure clarity in technical documentation.
This component serves the documentation pipeline by providing structured rules for creating flowcharts, sequence diagrams, and class diagrams. It integrates with the project's AI Code Quality Standards and Agent Skill Best Practices to maintain consistency across the knowledge base.
Sources: .agents/skills/hx-archify/SKILL.md, ai-docs/003-AI/004-记忆/003-obsidian-second-brain/index.md:1-15
Diagram Generation Standards
The skill enforces specific Mermaid directives and formatting rules to ensure diagrams render reliably across different Markdown viewers. It prioritizes vertical layouts and alphanumeric node IDs to prevent rendering failures.
Recommended Layouts and Syntax
- Flowcharts: Use
flowchart TDorgraph TDfor top-down layouts. - Node IDs: Use alphanumeric characters and underscores only. Avoid spaces and special characters within IDs.
- Connections: Use standard arrows (
-->), lines (---), or dotted arrows (-.->). - Labels: Keep node labels concise, ideally under 25 characters for readability.
Sources: .agents/skills/hx-archify/SKILL.md:25-45
Sequence Diagram Patterns
Sequence diagrams must explicitly participate names without spaces and use correct arrow types for communication flows:
->>for synchronous calls.-->>for responses.-xfor failed messages.
The diagram above illustrates the typical interaction flow when generating documentation assets.
Sources: .agents/skills/hx-archify/SKILL.md:46-60
Implementation Roles and Constraints
The hx-archify tool operates under the "Low Freedom" (Low-degree-of-freedom) category for critical operations. This means it follows fixed scripts and determined sequences for generating complex diagrams to ensure deterministic and accurate outputs.
Technical Constraints Table
| Attribute | Requirement | Source |
|---|---|---|
| Logic Basis | Solely derived from RELEVANT_SOURCE_FILES | .agents/skills/hx-archify/SKILL.md |
| Language | English (Technical/Direct) | .agents/skills/hx-archify/SKILL.md |
| Formatting | Markdown + Mermaid Blocks | .agents/skills/hx-archify/SKILL.md |
| Citations | Mandatory file and line number ranges | .agents/skills/hx-archify/SKILL.md |
Sources: .agents/skills/hx-archify/SKILL.md:10-100, ai-docs/003-AI/005-Skill/002-Agent-Skill编写最佳实践/index.md:120-135
Data Flow and Integration
The generator acts as a "Compaction Engine" for technical context. It condenses conversation and code history into structured checkpoints and visual models.
The flow represents the transformation of raw project files into the final wiki documentation presented to the user.
Sources: ai-docs/003-AI/004-记忆/003-obsidian-second-brain/index.md:120-140, ai-docs/003-AI/005-Skill/002-Agent-Skill编写最佳实践/index.md:40-60
Maintenance and Quality Gates
Per the repository's AI Code Quality specs, any generated architectural documentation must meet the following criteria:
- Strictly No Emojis: Documentation and diagrams must avoid emojis and Chinese punctuation to maintain ASCII compatibility.
- Verification: Diagrams must be mentally tested for syntax before inclusion.
- Complexity Management: If a diagram becomes too complex, the skill splits it into multiple focused diagrams.
- Baseline Standards: Changes to architecture documentation must be recorded in
decisions/orreference/directories.
Sources: blog/2026/10/07/01-AI代码质量.md:150-180, .agents/skills/hx-archify/SKILL.md:65-80
The hx-archify skill ensures that visual documentation in the HXLoLi project remains accurate, standardized, and easy to maintain by strictly adhering to Mermaid best practices and repository-specific coding standards.