You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/2025-10-28-Alan.md
+111Lines changed: 111 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,30 @@ Unlike single-purpose generators, MrDocs separates the **corpus** (semantic data
25
25
26
26
From the user’s perspective, MrDocs behaves like a **well-engineered CLI utility**. It accepts **configuration files**, supports **relative paths**, accepts custom **build options**, and reports **warnings** in a controlled, **compiler-like** fashion. For C++ teams transitioning from **Doxygen**, the **command structure** is somewhat familiar, but the **internal model** is designed for **reproducibility** and **correctness**. Our goal is not just to render **reference pages** but to provide a **reliable pipeline** that any C++ project seeking **modern documentation infrastructure** can adopt.
27
27
28
+
{% mermaid %}
29
+
graph LR
30
+
A[Source] --> B[Clang]
31
+
B --> C[Corpus]
32
+
C --> D{Plugin Layer}
33
+
subgraph Generator
34
+
E[HTML]
35
+
F[AsciiDoc]
36
+
G[XML]
37
+
G2[...]
38
+
end
39
+
D --> E
40
+
D --> F
41
+
D --> G
42
+
D --> G2
43
+
E --> H{Plugin Layer}
44
+
H --> H2[Published Docs]
45
+
F --> H
46
+
G --> H
47
+
G2 --> H
48
+
C --> I[Schema Export]
49
+
I --> J[Integrations<br/>IDEs & Build Systems]
50
+
{% endmermaid %}
51
+
28
52
## 2024: Lessons from a Fragile Prototype
29
53
30
54
MrDocs entered 2024 as a proof-of-concept built for Boost.URL. It could document one or two curated codebases and produce asciidoc pages for Antora, but the workflow stopped there. The CLI exposed only the scenarios we needed. Configuration options lived in internal notes. The only dependable build path was the script sequence we used inside the Alliance. External users hit errors and missing options almost immediately.
@@ -46,6 +70,18 @@ In short:
46
70
- Every improvement exposed another weak link, and every success demanded more structure than the system was built to handle.
47
71
- It was a year of learning by exhaustion—and setting the stage for everything that came next.
48
72
73
+
Key 2024 checkpoints align with the timeline below:
I started the year with a gap analysis that compared MrDocs to other C++ documentation pipelines. From that review I defined the minimum viable product and three priority tracks. **Usability** covered workflows and surface area that make adoption simple. **Stability** covered deterministic behavior, proper data structures, and CI discipline. **Foundation** covered configuration and data models that keep code, flags, and documentation aligned. The 2025 releases followed those tracks and turned MrDocs from a proof of concept into a tool that other teams can adopt.
@@ -56,6 +92,32 @@ I started the year with a gap analysis that compared MrDocs to other C++ documen
56
92
57
93
Together, these releases executed the roadmap derived from the initial gap analysis: they **aligned** the moving parts, **closed** the most important capability gaps, and delivered a **stable foundation** that future work can extend without re-litigating fundamentals.
58
94
95
+
{% mermaid %}
96
+
%%{init: {"theme": "base", "themeVariables": {
97
+
"primaryColor": "#e4eee8",
98
+
"primaryBorderColor": "#affbd6",
99
+
"primaryTextColor": "#000000",
100
+
"lineColor": "#baf9d9",
101
+
"secondaryColor": "#f0eae4",
102
+
"tertiaryColor": "#ebeaf4",
103
+
"fontSize": "14px"
104
+
}}}%%
105
+
mindmap
106
+
root((MVP Evolution))
107
+
v0.0.3
108
+
Config sync
109
+
Shared templates
110
+
CI discipline
111
+
v0.0.4
112
+
Warning controls
113
+
Schema
114
+
Bootstrap
115
+
v0.0.5
116
+
Recursive docs
117
+
Nav refresh
118
+
Tooling polish
119
+
{% endmermaid %}
120
+
59
121
## v0.0.3: Enforcing Consistency
60
122
61
123
`v0.0.3` is where MrDocs stopped being a collection of one-off special cases and became a coherent system. Before this release, features landed in a single generator and drifted from the others; extraction handled only the narrowly requested pattern and crashed on nearby ones; and options were inconsistent—some hard-coded, some missing from CLI/config, with no mechanism to keep code, docs, and flags aligned.
@@ -197,6 +259,36 @@ MrDocs now ships a working MVP, but significant **foundational work** remains. T
197
259
198
260
I do not know how the leadership model will evolve in 2026. The team might keep a single coordinator or move to shared stewardship. Regardless, the project only succeeds if we continue investing in **foundational capabilities**. The steps below outline the **recommendations** I believe will help keep MrDocs **sustainable over the long term**.
199
261
262
+
{% mermaid %}
263
+
%%{init: {"theme": "base", "themeVariables": {
264
+
"primaryColor": "#f2eadf",
265
+
"primaryBorderColor": "#ffe8c6",
266
+
"primaryTextColor": "#000000",
267
+
"lineColor": "#ffe8c8",
268
+
"secondaryColor": "#e8ebf3",
269
+
"tertiaryColor": "#eceaf4",
270
+
"fontSize": "14px"
271
+
}}}%%
272
+
mindmap
273
+
root((2026 Priorities))
274
+
Reflection
275
+
Describe symbols
276
+
Shared walkers
277
+
Metadata
278
+
Recursive docs
279
+
Stable names
280
+
Typed expressions
281
+
Extensions
282
+
Script helpers
283
+
Plugin ABI
284
+
Dependencies
285
+
Curated toolchain
286
+
Opt-in stubs
287
+
Community
288
+
Integration demos
289
+
Outreach cadence
290
+
{% endmermaid %}
291
+
200
292
## Strategic Prioritization
201
293
202
294
Aligning **priorities** is itself the highest priority. At the start of my tenure as project lead we followed a strict sequence—**gap analysis**, then an **MVP**, then a set of **priorities**—but that model exposed limitations once work began to land. The **issue tracker** does not reflect how priorities relate to each other, and as individual tickets close the priority stack does not adjust automatically. The project’s **complexity** now amplifies the risk: without a clear view of **dependencies** we can assign a high-value engineer to a task that drags several teammates into the same bottleneck, resulting in net-negative progress. Defining priorities therefore includes understanding the team’s **skills**, mapping how they **collaborate**, and making sure no one becomes a **sink** that blocks everyone else. **Alignment** across roles remains essential so the plan reflects the people who actually execute it.
@@ -211,6 +303,25 @@ The corpus keeps drifting out of sync because every important path in MrDocs dup
211
303
212
304
A lightweight option would be to enforce the corpus from JSON the way we treat configuration, but the volume of metadata in AST makes that impractical. Instead, we lean on **compile-time reflection utilities** such as **Boost.Describe** and **Boost.mp11**. With those libraries we can convert the corpus to any representation, and each generator—including future **binary** or **JSON** targets—sees the same schema automatically. MrDocs can even emit the schema that powers each generator, keeping the schema, DOM, and documentation in sync. This approach also fixes the long-standing lag in the **XML generator**, where updates have historically been manual and error-prone.
213
305
306
+
The following sequence diagram illustrates how reflection consolidates data flow without duplicating logic:
307
+
308
+
{% mermaid %}
309
+
sequenceDiagram
310
+
participant AST as Clang AST
311
+
participant Corpus as Typed Corpus
312
+
participant Traits as Reflect Traits
313
+
participant DOM as Corpus DOM
314
+
participant Generators as Generators
315
+
participant Clients as Integrations
316
+
AST->>Corpus: Extract symbols
317
+
Corpus->>Traits: Publish descriptors
318
+
Traits->>DOM: Build type-erased nodes
319
+
DOM->>Generators: Supply normalized schema
320
+
Generators->>Clients: Deliver outputs
321
+
Clients->>Generators: Provide feedback
322
+
Generators->>Traits: Request updates
323
+
{% endmermaid %}
324
+
214
325
**Process:** We can start by describing the **Symbols**, **Javadoc**, and related classes, shipping each refactor as a dedicated PR so reviews stay contained. Each description removes custom specializations, reverts to `= default` where possible, and replaces old logic with **static asserts** that enforce invariants. We generalize the main merge logic first, then update callers such as the **AST visitor** that walks `RecordTranche`, ensuring the **comments data structure** matches the new descriptions. A `MRDOCS_DESCRIBE_DERIVED` helper can enumerate derived classes so every visit routine becomes generic. Once the C++ side is described, we rebuild the lazy DOM objects on top of Describe so their types mirror the DOM layout directly.
215
326
216
327
**Use cases:** Redundant non-member functions like `tag_invoke`, `operator⇔`, `toString`, and `merge` collapse into **shared implementations** that use traits unless real customization is required. New generators—binary, JSON, or otherwise—drop in with minimal code because the schema and traversal logic already exist. The XML generator stops maintaining a private representation and simply reads the described elements. We can finally standardize **naming conventions** (kebab-case or camelCase) because the schema enforces them. Generating the **Relax NG Compact** file becomes just another output produced from the same description. A metadata walker can then discover auxiliary objects and emit **DOM documentation automatically**. As a side effect of integrating Boost.mp11, we can extend the `tag_invoke` context protocol with tuple-based helpers for `mrdocs::FromValue`, further narrowing the gap between concrete and DOM objects.
0 commit comments