@pagenary/publisher 2026.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +337 -0
  3. package/bin/pagenary.mjs +116 -0
  4. package/build.config.json +5 -0
  5. package/package.json +66 -0
  6. package/scripts/build-site.js +87 -0
  7. package/scripts/build-tenants.js +3569 -0
  8. package/scripts/build.js +99 -0
  9. package/scripts/generate-sections.js +41 -0
  10. package/scripts/lib/seo-generator.js +558 -0
  11. package/scripts/lint-content.js +62 -0
  12. package/scripts/seo-smoke.js +94 -0
  13. package/scripts/serve.js +142 -0
  14. package/site/app.js +1 -0
  15. package/site/index.html +57 -0
  16. package/site/lib/categories.js +1 -0
  17. package/site/lib/export.js +1 -0
  18. package/site/lib/manifest-utils.js +1 -0
  19. package/site/lib/router.js +1 -0
  20. package/site/lib/search.js +1 -0
  21. package/site/llms.txt +22 -0
  22. package/site/manifest.js +132 -0
  23. package/site/mermaid-init.js +1 -0
  24. package/site/pages/api.html +339 -0
  25. package/site/pages/architecture.html +303 -0
  26. package/site/pages/deployment.html +282 -0
  27. package/site/pages/developer-guide.html +157 -0
  28. package/site/pages/extending.html +135 -0
  29. package/site/pages/quickstart.html +318 -0
  30. package/site/pages/seo-strategy.html +121 -0
  31. package/site/pages/tenant-config.html +519 -0
  32. package/site/pages/welcome.html +116 -0
  33. package/site/robots.txt +10 -0
  34. package/site/sections/api.js +3 -0
  35. package/site/sections/architecture.js +3 -0
  36. package/site/sections/deployment.js +3 -0
  37. package/site/sections/developer-guide.js +3 -0
  38. package/site/sections/extending.js +3 -0
  39. package/site/sections/quickstart.js +3 -0
  40. package/site/sections/section-templates.js +1 -0
  41. package/site/sections/seo-strategy.js +3 -0
  42. package/site/sections/tenant-config.js +3 -0
  43. package/site/sections/welcome.js +3 -0
  44. package/site/seo.js +1 -0
  45. package/site/sitemap.xml +63 -0
  46. package/site/styles.css +1982 -0
  47. package/site/syntax-highlight.js +1 -0
  48. package/src/app.js +988 -0
  49. package/src/index.html +56 -0
  50. package/src/lib/categories.js +55 -0
  51. package/src/lib/export.js +195 -0
  52. package/src/lib/manifest-utils.js +69 -0
  53. package/src/lib/router.js +44 -0
  54. package/src/lib/search.js +151 -0
  55. package/src/manifest.js +246 -0
  56. package/src/mermaid-init.js +207 -0
  57. package/src/sections/archive-future-roadmap.js +7 -0
  58. package/src/sections/archive-initiative-alpha.js +7 -0
  59. package/src/sections/archive-milestone-records.js +7 -0
  60. package/src/sections/archive-timeline-overview.js +7 -0
  61. package/src/sections/core-technology-compliance-frameworks.js +7 -0
  62. package/src/sections/core-technology-coordination-model.js +7 -0
  63. package/src/sections/core-technology-data-definitions.js +7 -0
  64. package/src/sections/core-technology-hardware-integration.js +7 -0
  65. package/src/sections/core-technology-integrity-controls.js +7 -0
  66. package/src/sections/core-technology-network-topology.js +7 -0
  67. package/src/sections/core-technology-operator-requirements.js +7 -0
  68. package/src/sections/core-technology-overview.js +7 -0
  69. package/src/sections/core-technology-service-interfaces.js +7 -0
  70. package/src/sections/core-technology-synchronization-strategy.js +7 -0
  71. package/src/sections/core-technology-system-foundation.js +7 -0
  72. package/src/sections/developers-api-credentials.js +7 -0
  73. package/src/sections/developers-api-operations.js +7 -0
  74. package/src/sections/developers-api-reference.js +7 -0
  75. package/src/sections/developers-api-websocket.js +7 -0
  76. package/src/sections/developers-automation-blueprints.js +7 -0
  77. package/src/sections/developers-automation-modules.js +7 -0
  78. package/src/sections/developers-automation-patterns.js +7 -0
  79. package/src/sections/developers-deployment-playbook.js +7 -0
  80. package/src/sections/developers-overview.js +7 -0
  81. package/src/sections/developers-scheduling-patterns.js +7 -0
  82. package/src/sections/developers-sdk-go.js +7 -0
  83. package/src/sections/developers-sdk-javascript.js +7 -0
  84. package/src/sections/developers-sdk-python.js +7 -0
  85. package/src/sections/developers-sdk-rust.js +7 -0
  86. package/src/sections/developers-sdks.js +7 -0
  87. package/src/sections/developers-solution-examples.js +7 -0
  88. package/src/sections/developers-testing-framework.js +7 -0
  89. package/src/sections/getting-started-architecture-basics.js +7 -0
  90. package/src/sections/getting-started-introduction.js +7 -0
  91. package/src/sections/getting-started-performance-overview.js +7 -0
  92. package/src/sections/governance-community-initiatives.js +7 -0
  93. package/src/sections/governance-dao-overview.js +7 -0
  94. package/src/sections/governance-multi-token.js +7 -0
  95. package/src/sections/governance-overview.js +7 -0
  96. package/src/sections/governance-proposal-process.js +7 -0
  97. package/src/sections/governance-proposals.js +7 -0
  98. package/src/sections/governance-structure.js +7 -0
  99. package/src/sections/governance-token-distribution.js +7 -0
  100. package/src/sections/governance-treasury.js +7 -0
  101. package/src/sections/operations-environment-prep.js +7 -0
  102. package/src/sections/operations-getting-started.js +7 -0
  103. package/src/sections/operations-incentives-guide.js +7 -0
  104. package/src/sections/operations-incentives-strategies.js +7 -0
  105. package/src/sections/operations-incentives.js +7 -0
  106. package/src/sections/operations-infrastructure.js +7 -0
  107. package/src/sections/operations-monitoring.js +7 -0
  108. package/src/sections/operations-overview.js +7 -0
  109. package/src/sections/operations-performance.js +7 -0
  110. package/src/sections/operations-power-infrastructure.js +7 -0
  111. package/src/sections/operations-setup-guide.js +7 -0
  112. package/src/sections/operations-sync-setup.js +7 -0
  113. package/src/sections/products-flagship-solution.js +7 -0
  114. package/src/sections/products-solution-library.js +7 -0
  115. package/src/sections/resources-brand-assets.js +7 -0
  116. package/src/sections/resources-faq.js +7 -0
  117. package/src/sections/resources-glossary.js +7 -0
  118. package/src/sections/resources-research-papers.js +7 -0
  119. package/src/sections/section-templates.js +873 -0
  120. package/src/sections/security-audits.js +7 -0
  121. package/src/sections/security-best-practices.js +7 -0
  122. package/src/sections/security-bug-bounty.js +7 -0
  123. package/src/sections/security-incident-response.js +7 -0
  124. package/src/sections/security-overview.js +7 -0
  125. package/src/sections/technical-architecture.js +7 -0
  126. package/src/sections/technical-whitepaper.js +7 -0
  127. package/src/sections/tutorial-automation-bot.js +7 -0
  128. package/src/sections/tutorial-build-first-integration.js +7 -0
  129. package/src/sections/tutorial-deploy-automation.js +7 -0
  130. package/src/sections/tutorial-event-driven-experience.js +7 -0
  131. package/src/sections/tutorial-operations-onboarding.js +7 -0
  132. package/src/sections/tutorial-systems-integration.js +7 -0
  133. package/src/sections/tutorials-overview.js +7 -0
  134. package/src/sections/use-case-connected-devices.js +7 -0
  135. package/src/sections/use-case-digital-auctions.js +7 -0
  136. package/src/sections/use-case-financial-automation.js +7 -0
  137. package/src/sections/use-case-interactive-media.js +7 -0
  138. package/src/sections/use-case-realtime-execution.js +7 -0
  139. package/src/sections/use-case-research-analytics.js +7 -0
  140. package/src/sections/use-case-supply-operations.js +7 -0
  141. package/src/sections/use-cases-overview.js +7 -0
  142. package/src/sections/welcome-overview.js +7 -0
  143. package/src/seo.js +90 -0
  144. package/src/styles.css +1982 -0
  145. package/src/syntax-highlight.js +90 -0
  146. package/tenants.json.example +68 -0
  147. package/tenants.schema.json +231 -0
@@ -0,0 +1,873 @@
1
+ import { inferCategory, titleFromId } from '../lib/categories.js';
2
+
3
+ const CATEGORY_CONFIG = {
4
+ welcome: {
5
+ summary: 'Template for a hero-led welcome page with highlight cards and onboarding calls to action.',
6
+ render: (title) => `
7
+ <section class="section doc" data-template="welcome">
8
+ <div class="doc-content">
9
+ <header>
10
+ <p class="eyebrow">Welcome template</p>
11
+ <h1>${title}</h1>
12
+ <p class="lead">Introduce the tenant offering with a crisp positioning statement and a primary action.</p>
13
+ </header>
14
+ <div>
15
+ <h2>Value pillars</h2>
16
+ <ul>
17
+ <li>Summarize the first benefit in one focused sentence.</li>
18
+ <li>Highlight a differentiator that matters to your audience.</li>
19
+ <li>Call out an operational promise (support, scale, cost, or speed).</li>
20
+ </ul>
21
+ </div>
22
+ <div>
23
+ <h2>Launch checklist</h2>
24
+ <ol>
25
+ <li>Define the promise in a single headline.</li>
26
+ <li>List one call to action for new visitors.</li>
27
+ <li>Showcase three quick proof points or partner logos.</li>
28
+ </ol>
29
+ </div>
30
+ <aside>
31
+ <h3>Quick links</h3>
32
+ <ul>
33
+ <li><a href="#">{{ Primary guide }}</a></li>
34
+ <li><a href="#">{{ Pricing or packaging }}</a></li>
35
+ <li><a href="#">{{ Support channel }}</a></li>
36
+ </ul>
37
+ </aside>
38
+ <blockquote>
39
+ <p>Use a short testimonial, mission statement, or founder quote to reinforce credibility.</p>
40
+ </blockquote>
41
+ </div>
42
+ </section>
43
+ `.trim()
44
+ },
45
+ guide: {
46
+ summary: 'Template for introductory guides with prerequisites, phased steps, and success criteria.',
47
+ render: (title) => `
48
+ <section class="section doc" data-template="guide">
49
+ <div class="doc-content">
50
+ <header>
51
+ <p class="eyebrow">Guide template</p>
52
+ <h1>${title}</h1>
53
+ <p class="lead">Use this structure to walk new tenants through concepts or setup flows without assuming prior context.</p>
54
+ </header>
55
+ <div>
56
+ <h2>Audience</h2>
57
+ <p>Define who should use this guide and what they should already know.</p>
58
+ <ul>
59
+ <li>Primary persona and role.</li>
60
+ <li>Target environment or tooling.</li>
61
+ <li>Expected time to complete the guide.</li>
62
+ </ul>
63
+ </div>
64
+ <div>
65
+ <h2>Prerequisites</h2>
66
+ <ul>
67
+ <li>{{ Accounts or credentials }}</li>
68
+ <li>{{ Access to sandbox tools }}</li>
69
+ <li>{{ Required hardware or environment }}</li>
70
+ </ul>
71
+ </div>
72
+ <div>
73
+ <h2>Implementation steps</h2>
74
+ <ol>
75
+ <li><strong>Phase 1:</strong> Outline the initial decisions or configurations.</li>
76
+ <li><strong>Phase 2:</strong> Describe the hands-on tasks with expected outcomes.</li>
77
+ <li><strong>Phase 3:</strong> Document validation, roll-out, and next actions.</li>
78
+ </ol>
79
+ </div>
80
+ <div>
81
+ <h2>Success checks</h2>
82
+ <table>
83
+ <thead>
84
+ <tr>
85
+ <th>Checkpoint</th>
86
+ <th>How to test</th>
87
+ <th>Owner</th>
88
+ </tr>
89
+ </thead>
90
+ <tbody>
91
+ <tr>
92
+ <td>{{ Configuration saved }}</td>
93
+ <td>{{ Command or UI indicator }}</td>
94
+ <td>{{ Persona }}</td>
95
+ </tr>
96
+ <tr>
97
+ <td>{{ Connectivity verified }}</td>
98
+ <td>{{ Metric or log }}</td>
99
+ <td>{{ Persona }}</td>
100
+ </tr>
101
+ <tr>
102
+ <td>{{ Feature enabled }}</td>
103
+ <td>{{ Screenshot or report }}</td>
104
+ <td>{{ Persona }}</td>
105
+ </tr>
106
+ </tbody>
107
+ </table>
108
+ </div>
109
+ </div>
110
+ </section>
111
+ `.trim()
112
+ },
113
+ reference: {
114
+ summary: 'Template for technical reference pages that capture concepts, constraints, and integration notes.',
115
+ render: (title) => `
116
+ <section class="section doc" data-template="reference">
117
+ <div class="doc-content">
118
+ <header>
119
+ <p class="eyebrow">Reference template</p>
120
+ <h1>${title}</h1>
121
+ <p class="lead">Document the underlying concepts, invariants, and responsibilities that engineers must respect.</p>
122
+ </header>
123
+ <div>
124
+ <h2>Concept summary</h2>
125
+ <p>Describe the the core idea in two or three sentences. Keep it factual and implementation oriented.</p>
126
+ <ul>
127
+ <li>State the problem that this component solves.</li>
128
+ <li>Outline what makes the approach distinctive.</li>
129
+ <li>Clarify the boundary of the component.</li>
130
+ </ul>
131
+ </div>
132
+ <div>
133
+ <h2>Implementation notes</h2>
134
+ <p>Break down how this element behaves in production environments.</p>
135
+ <ul>
136
+ <li>Lifecycle stages or state transitions.</li>
137
+ <li>Performance considerations.</li>
138
+ <li>Failure modes and protective measures.</li>
139
+ </ul>
140
+ </div>
141
+ <div>
142
+ <h2>Integration matrix</h2>
143
+ <table>
144
+ <thead>
145
+ <tr>
146
+ <th>Dependency</th>
147
+ <th>Interaction</th>
148
+ <th>Notes</th>
149
+ </tr>
150
+ </thead>
151
+ <tbody>
152
+ <tr>
153
+ <td>{{ Upstream service }}</td>
154
+ <td>{{ Data exchanged }}</td>
155
+ <td>{{ Contract version }}</td>
156
+ </tr>
157
+ <tr>
158
+ <td>{{ Downstream client }}</td>
159
+ <td>{{ Protocol or channel }}</td>
160
+ <td>{{ Rate limits }}</td>
161
+ </tr>
162
+ <tr>
163
+ <td>{{ Operational contact }}</td>
164
+ <td>{{ SLA or escalation }}</td>
165
+ <td>{{ Ownership }}</td>
166
+ </tr>
167
+ </tbody>
168
+ </table>
169
+ </div>
170
+ </div>
171
+ </section>
172
+ `.trim()
173
+ },
174
+ technical: {
175
+ summary: 'Template for system architecture or deep dive documents with diagram callouts and layered explanations.',
176
+ render: (title) => `
177
+ <section class="section doc" data-template="technical">
178
+ <div class="doc-content">
179
+ <header>
180
+ <p class="eyebrow">Architecture template</p>
181
+ <h1>${title}</h1>
182
+ <p class="lead">Capture the layered view of the platform with clear responsibilities and communication paths.</p>
183
+ </header>
184
+ <div>
185
+ <h2>Layered overview</h2>
186
+ <p>Detail each layer of the system from the entry point down to persistence or integrations.</p>
187
+ <ol>
188
+ <li>{{ Experience or API layer }}</li>
189
+ <li>{{ Orchestration or service layer }}</li>
190
+ <li>{{ Infrastructure or data layer }}</li>
191
+ </ol>
192
+ </div>
193
+ <div>
194
+ <h2>Diagram callouts</h2>
195
+ <ul>
196
+ <li>Insert diagram filename or location.</li>
197
+ <li>List the components to label.</li>
198
+ <li>Note any external dependencies.</li>
199
+ </ul>
200
+ <pre><code class="language-mermaid">graph TD
201
+ A[Client] -->|{{ Protocol }}| B[Gateway]
202
+ B --> C[Service Cluster]
203
+ C --> D[Data or Time Authority]
204
+ </code></pre>
205
+ </div>
206
+ <div>
207
+ <h2>Operational summary</h2>
208
+ <blockquote>
209
+ <p>Summarize the most important runtime behaviors, including scaling levers and recovery hooks.</p>
210
+ </blockquote>
211
+ </div>
212
+ </div>
213
+ </section>
214
+ `.trim()
215
+ },
216
+ developer: {
217
+ summary: 'Template for developer-focused material featuring code examples, API usage, and quick start commands.',
218
+ render: (title) => `
219
+ <section class="section doc" data-template="developer">
220
+ <div class="doc-content">
221
+ <header>
222
+ <p class="eyebrow">Developer template</p>
223
+ <h1>${title}</h1>
224
+ <p class="lead">Guide engineers through integrating with the platform using concise examples and copyable snippets.</p>
225
+ </header>
226
+ <div>
227
+ <h2>Before you begin</h2>
228
+ <ul>
229
+ <li>{{ Install the preferred SDK }}</li>
230
+ <li>{{ Configure environment variables }}</li>
231
+ <li>{{ Retrieve test credentials }}</li>
232
+ </ul>
233
+ </div>
234
+ <div>
235
+ <h2>Sample workflow</h2>
236
+ <pre><code class="language-javascript">import { Client } from '@tenant/sdk';
237
+
238
+ const client = new Client({ endpoint: process.env.TENANT_API });
239
+ const response = await client.connect({
240
+ workspace: '{{ workspace-id }}',
241
+ token: process.env.TENANT_TOKEN,
242
+ });
243
+
244
+ console.log('Connected:', response.status);
245
+ </code></pre>
246
+ </div>
247
+ <div>
248
+ <h2>Key methods</h2>
249
+ <table>
250
+ <thead>
251
+ <tr>
252
+ <th>Method</th>
253
+ <th>Purpose</th>
254
+ <th>Notes</th>
255
+ </tr>
256
+ </thead>
257
+ <tbody>
258
+ <tr>
259
+ <td><code>initialize()</code></td>
260
+ <td>Set up configuration and authentication.</td>
261
+ <td>Call once per application lifecycle.</td>
262
+ </tr>
263
+ <tr>
264
+ <td><code>submitTask()</code></td>
265
+ <td>Send a time-sensitive job to the network.</td>
266
+ <td>Include idempotency keys.</td>
267
+ </tr>
268
+ <tr>
269
+ <td><code>watchStatus()</code></td>
270
+ <td>Subscribe to updates and react to state changes.</td>
271
+ <td>Handles retries internally.</td>
272
+ </tr>
273
+ </tbody>
274
+ </table>
275
+ </div>
276
+ <div>
277
+ <h2>Next steps</h2>
278
+ <ul>
279
+ <li>Link to extended examples.</li>
280
+ <li>Point to sandbox or mock services.</li>
281
+ <li>Outline production readiness checks.</li>
282
+ </ul>
283
+ </div>
284
+ </div>
285
+ </section>
286
+ `.trim()
287
+ },
288
+ governance: {
289
+ summary: 'Template for governance documentation covering decision models, roles, and proposal lifecycles.',
290
+ render: (title) => `
291
+ <section class="section doc" data-template="governance">
292
+ <div class="doc-content">
293
+ <header>
294
+ <p class="eyebrow">Governance template</p>
295
+ <h1>${title}</h1>
296
+ <p class="lead">Explain how decisions are made, who participates, and how outcomes are recorded across tenants.</p>
297
+ </header>
298
+ <div>
299
+ <h2>Decision model</h2>
300
+ <p>Summarize the governance structure in plain language.</p>
301
+ <ul>
302
+ <li>{{ Council or committee scope }}</li>
303
+ <li>{{ Voting mechanism }}</li>
304
+ <li>{{ Quorum or approval threshold }}</li>
305
+ </ul>
306
+ </div>
307
+ <div>
308
+ <h2>Roles and responsibilities</h2>
309
+ <table>
310
+ <thead>
311
+ <tr>
312
+ <th>Role</th>
313
+ <th>Accountabilities</th>
314
+ <th>Tenure</th>
315
+ </tr>
316
+ </thead>
317
+ <tbody>
318
+ <tr>
319
+ <td>{{ Operator }}</td>
320
+ <td>{{ Executes approved changes }}</td>
321
+ <td>{{ Duration or rotation }}</td>
322
+ </tr>
323
+ <tr>
324
+ <td>{{ Reviewer }}</td>
325
+ <td>{{ Evaluates proposals }}</td>
326
+ <td>{{ Duration or rotation }}</td>
327
+ </tr>
328
+ <tr>
329
+ <td>{{ Treasurer }}</td>
330
+ <td>{{ Manages budget or reserves }}</td>
331
+ <td>{{ Duration or rotation }}</td>
332
+ </tr>
333
+ </tbody>
334
+ </table>
335
+ </div>
336
+ <div>
337
+ <h2>Proposal lifecycle</h2>
338
+ <ol>
339
+ <li>Draft and collect supporting context.</li>
340
+ <li>Publish for review and comment.</li>
341
+ <li>Formal vote and implementation planning.</li>
342
+ <li>Retrospective and transparent reporting.</li>
343
+ </ol>
344
+ </div>
345
+ </div>
346
+ </section>
347
+ `.trim()
348
+ },
349
+ product: {
350
+ summary: 'Template for product-oriented pages showing positioning, features, and packaging options.',
351
+ render: (title) => `
352
+ <section class="section doc" data-template="product">
353
+ <div class="doc-content">
354
+ <header>
355
+ <p class="eyebrow">Product template</p>
356
+ <h1>${title}</h1>
357
+ <p class="lead">Capture how this offer solves a customer problem and how it is packaged across tenants.</p>
358
+ </header>
359
+ <div>
360
+ <h2>Positioning</h2>
361
+ <p>Describe what the product does, who it is for, and the primary outcomes.</p>
362
+ <ul>
363
+ <li>Problem statement.</li>
364
+ <li>Solution narrative.</li>
365
+ <li>Proof or validation.</li>
366
+ </ul>
367
+ </div>
368
+ <div>
369
+ <h2>Feature highlights</h2>
370
+ <ul>
371
+ <li><strong>{{ Feature name }}</strong> — Explain the capability in a single sentence.</li>
372
+ <li><strong>{{ Feature name }}</strong> — Outline what makes it distinct.</li>
373
+ <li><strong>{{ Feature name }}</strong> — Tie back to measurable outcomes.</li>
374
+ </ul>
375
+ </div>
376
+ <div>
377
+ <h2>Packaging</h2>
378
+ <table>
379
+ <thead>
380
+ <tr>
381
+ <th>Plan</th>
382
+ <th>Includes</th>
383
+ <th>Notes</th>
384
+ </tr>
385
+ </thead>
386
+ <tbody>
387
+ <tr>
388
+ <td>{{ Starter }}</td>
389
+ <td>{{ Core features }}</td>
390
+ <td>{{ Ideal audience }}</td>
391
+ </tr>
392
+ <tr>
393
+ <td>{{ Growth }}</td>
394
+ <td>{{ Advanced options }}</td>
395
+ <td>{{ Volume considerations }}</td>
396
+ </tr>
397
+ <tr>
398
+ <td>{{ Enterprise }}</td>
399
+ <td>{{ Custom commitments }}</td>
400
+ <td>{{ Contact channel }}</td>
401
+ </tr>
402
+ </tbody>
403
+ </table>
404
+ </div>
405
+ </div>
406
+ </section>
407
+ `.trim()
408
+ },
409
+ resource: {
410
+ summary: 'Template for resource collections such as FAQs, glossaries, or download libraries.',
411
+ render: (title) => `
412
+ <section class="section doc" data-template="resource">
413
+ <div class="doc-content">
414
+ <header>
415
+ <p class="eyebrow">Resource template</p>
416
+ <h1>${title}</h1>
417
+ <p class="lead">Share supporting materials, definitions, and reference links for tenant operators.</p>
418
+ </header>
419
+ <div>
420
+ <h2>Collections</h2>
421
+ <ul>
422
+ <li>{{ Guide or handbook }} — Brief description.</li>
423
+ <li>{{ Policy or playbook }} — Brief description.</li>
424
+ <li>{{ Template or worksheet }} — Brief description.</li>
425
+ </ul>
426
+ </div>
427
+ <div>
428
+ <h2>Document index</h2>
429
+ <table>
430
+ <thead>
431
+ <tr>
432
+ <th>Resource</th>
433
+ <th>Format</th>
434
+ <th>Owner</th>
435
+ </tr>
436
+ </thead>
437
+ <tbody>
438
+ <tr>
439
+ <td>{{ Starter kit }}</td>
440
+ <td>PDF</td>
441
+ <td>{{ Team }}</td>
442
+ </tr>
443
+ <tr>
444
+ <td>{{ API checklist }}</td>
445
+ <td>Spreadsheet</td>
446
+ <td>{{ Team }}</td>
447
+ </tr>
448
+ <tr>
449
+ <td>{{ Messaging assets }}</td>
450
+ <td>Archive</td>
451
+ <td>{{ Team }}</td>
452
+ </tr>
453
+ </tbody>
454
+ </table>
455
+ </div>
456
+ <div>
457
+ <h2>Support channels</h2>
458
+ <ul>
459
+ <li>Email: <code>support@example.com</code></li>
460
+ <li>Slack: <code>#tenant-help</code></li>
461
+ <li>Office hours: {{ Weekly cadence }}</li>
462
+ </ul>
463
+ </div>
464
+ </div>
465
+ </section>
466
+ `.trim()
467
+ },
468
+ security: {
469
+ summary: 'Template for security pages detailing trust posture, controls, and reporting processes.',
470
+ render: (title) => `
471
+ <section class="section doc" data-template="security">
472
+ <div class="doc-content">
473
+ <header>
474
+ <p class="eyebrow">Security template</p>
475
+ <h1>${title}</h1>
476
+ <p class="lead">Explain how the platform manages risk, handles incidents, and communicates with stakeholders.</p>
477
+ </header>
478
+ <div>
479
+ <h2>Security posture</h2>
480
+ <ul>
481
+ <li>Shared responsibility model.</li>
482
+ <li>Data classification guidelines.</li>
483
+ <li>Identity and access policies.</li>
484
+ </ul>
485
+ </div>
486
+ <div>
487
+ <h2>Controls</h2>
488
+ <table>
489
+ <thead>
490
+ <tr>
491
+ <th>Control</th>
492
+ <th>Objective</th>
493
+ <th>Evidence</th>
494
+ </tr>
495
+ </thead>
496
+ <tbody>
497
+ <tr>
498
+ <td>{{ Monitoring }}</td>
499
+ <td>{{ Detect drift }}</td>
500
+ <td>{{ Dashboard link }}</td>
501
+ </tr>
502
+ <tr>
503
+ <td>{{ Incident playbook }}</td>
504
+ <td>{{ Contain impact }}</td>
505
+ <td>{{ Checklist reference }}</td>
506
+ </tr>
507
+ <tr>
508
+ <td>{{ Vendor review }}</td>
509
+ <td>{{ Assess third parties }}</td>
510
+ <td>{{ Report cadence }}</td>
511
+ </tr>
512
+ </tbody>
513
+ </table>
514
+ </div>
515
+ <div>
516
+ <h2>Reporting</h2>
517
+ <p>Describe how to disclose vulnerabilities and how communication flows during an incident.</p>
518
+ <blockquote>
519
+ <p>Example email: <code>security@example.com</code></p>
520
+ </blockquote>
521
+ </div>
522
+ </div>
523
+ </section>
524
+ `.trim()
525
+ },
526
+ tutorial: {
527
+ summary: 'Template for actionable, step-by-step tutorials with prerequisites and validation tasks.',
528
+ render: (title) => `
529
+ <section class="section doc" data-template="tutorial">
530
+ <div class="doc-content">
531
+ <header>
532
+ <p class="eyebrow">Tutorial template</p>
533
+ <h1>${title}</h1>
534
+ <p class="lead">Walk through a structured exercise with clear checkpoints and expected outputs.</p>
535
+ </header>
536
+ <div>
537
+ <h2>Prerequisites</h2>
538
+ <ul>
539
+ <li>{{ Access token or credentials }}</li>
540
+ <li>{{ Local environment tools }}</li>
541
+ <li>{{ Sample project or dataset }}</li>
542
+ </ul>
543
+ </div>
544
+ <div>
545
+ <h2>Steps</h2>
546
+ <ol>
547
+ <li><strong>Set up:</strong> Outline the initial command or configuration.</li>
548
+ <li><strong>Implement:</strong> Explain the core action the user should complete.</li>
549
+ <li><strong>Validate:</strong> Provide an observable success signal.</li>
550
+ </ol>
551
+ </div>
552
+ <div>
553
+ <h2>Code sample</h2>
554
+ <pre><code class="language-python">from tenant import Client
555
+
556
+ client = Client(api_key="{{ api-key }}")
557
+ client.schedule(
558
+ task="{{ task-name }}",
559
+ execute_at="{{ timestamp }}",
560
+ )
561
+ </code></pre>
562
+ </div>
563
+ <div>
564
+ <h2>Troubleshooting</h2>
565
+ <ul>
566
+ <li>{{ Symptom }} — {{ Likely fix }}</li>
567
+ <li>{{ Symptom }} — {{ Likely fix }}</li>
568
+ <li>{{ Symptom }} — {{ Likely fix }}</li>
569
+ </ul>
570
+ </div>
571
+ </div>
572
+ </section>
573
+ `.trim()
574
+ },
575
+ 'tutorial-overview': {
576
+ summary: 'Template for tutorial indexes highlighting available walkthroughs and learning paths.',
577
+ render: (title) => `
578
+ <section class="section doc" data-template="tutorial-overview">
579
+ <div class="doc-content">
580
+ <header>
581
+ <p class="eyebrow">Tutorial index template</p>
582
+ <h1>${title}</h1>
583
+ <p class="lead">Provide curated learning paths so tenants can pick the right hands-on guide.</p>
584
+ </header>
585
+ <div>
586
+ <h2>Getting started first</h2>
587
+ <ul>
588
+ <li><strong>{{ Tutorial name }}</strong> — Onboarding fundamentals.</li>
589
+ <li><strong>{{ Tutorial name }}</strong> — Core integration walkthrough.</li>
590
+ <li><strong>{{ Tutorial name }}</strong> — Validation and deployment.</li>
591
+ </ul>
592
+ </div>
593
+ <div>
594
+ <h2>Choose a path</h2>
595
+ <table>
596
+ <thead>
597
+ <tr>
598
+ <th>Track</th>
599
+ <th>Includes</th>
600
+ <th>Outcome</th>
601
+ </tr>
602
+ </thead>
603
+ <tbody>
604
+ <tr>
605
+ <td>Builders</td>
606
+ <td>SDK setup, first data flow.</td>
607
+ <td>Prototype in sandbox.</td>
608
+ </tr>
609
+ <tr>
610
+ <td>Operators</td>
611
+ <td>Monitoring, alerting, runbooks.</td>
612
+ <td>Healthy day-two operations.</td>
613
+ </tr>
614
+ <tr>
615
+ <td>Analysts</td>
616
+ <td>Reporting, dashboards, exports.</td>
617
+ <td>Insights shared with stakeholders.</td>
618
+ </tr>
619
+ </tbody>
620
+ </table>
621
+ </div>
622
+ <div>
623
+ <h2>Where to ask questions</h2>
624
+ <p>List channels (chat, office hours, email) and expected response times.</p>
625
+ </div>
626
+ </div>
627
+ </section>
628
+ `.trim()
629
+ },
630
+ 'use-case': {
631
+ summary: 'Template for use case narratives that connect personas, workflows, and success metrics.',
632
+ render: (title) => `
633
+ <section class="section doc" data-template="use-case">
634
+ <div class="doc-content">
635
+ <header>
636
+ <p class="eyebrow">Use case template</p>
637
+ <h1>${title}</h1>
638
+ <p class="lead">Show how the platform supports a real scenario with tangible value and measurable outcomes.</p>
639
+ </header>
640
+ <div>
641
+ <h2>Scenario overview</h2>
642
+ <p>Describe the environment, triggers, and desired end state.</p>
643
+ </div>
644
+ <div>
645
+ <h2>Personas</h2>
646
+ <ul>
647
+ <li>{{ Persona }} — Motivation and core responsibility.</li>
648
+ <li>{{ Persona }} — Motivation and core responsibility.</li>
649
+ <li>{{ Persona }} — Motivation and core responsibility.</li>
650
+ </ul>
651
+ </div>
652
+ <div>
653
+ <h2>Workflow</h2>
654
+ <ol>
655
+ <li>Initiate the event and capture inputs.</li>
656
+ <li>Process through automation or smart logic.</li>
657
+ <li>Deliver outputs and confirm success signals.</li>
658
+ </ol>
659
+ </div>
660
+ <div>
661
+ <h2>Success metrics</h2>
662
+ <table>
663
+ <thead>
664
+ <tr>
665
+ <th>Metric</th>
666
+ <th>Target</th>
667
+ <th>How to measure</th>
668
+ </tr>
669
+ </thead>
670
+ <tbody>
671
+ <tr>
672
+ <td>{{ Latency }}</td>
673
+ <td>{{ Goal }}</td>
674
+ <td>{{ Tool }}</td>
675
+ </tr>
676
+ <tr>
677
+ <td>{{ Accuracy }}</td>
678
+ <td>{{ Goal }}</td>
679
+ <td>{{ Tool }}</td>
680
+ </tr>
681
+ <tr>
682
+ <td>{{ Cost }}</td>
683
+ <td>{{ Goal }}</td>
684
+ <td>{{ Tool }}</td>
685
+ </tr>
686
+ </tbody>
687
+ </table>
688
+ </div>
689
+ </div>
690
+ </section>
691
+ `.trim()
692
+ },
693
+ operations: {
694
+ summary: 'Template for operations runbooks with checklists, monitoring, and escalation paths.',
695
+ render: (title) => `
696
+ <section class="section doc" data-template="operations">
697
+ <div class="doc-content">
698
+ <header>
699
+ <p class="eyebrow">Operations template</p>
700
+ <h1>${title}</h1>
701
+ <p class="lead">Provide practical guidance for running tenant infrastructure and maintaining uptime.</p>
702
+ </header>
703
+ <div>
704
+ <h2>Daily checklist</h2>
705
+ <ul>
706
+ <li>Review health dashboards.</li>
707
+ <li>Verify synchronization status.</li>
708
+ <li>Confirm alerting channels are green.</li>
709
+ </ul>
710
+ </div>
711
+ <div>
712
+ <h2>Maintenance windows</h2>
713
+ <table>
714
+ <thead>
715
+ <tr>
716
+ <th>Activity</th>
717
+ <th>Frequency</th>
718
+ <th>Owner</th>
719
+ </tr>
720
+ </thead>
721
+ <tbody>
722
+ <tr>
723
+ <td>{{ Software updates }}</td>
724
+ <td>{{ Weekly or monthly }}</td>
725
+ <td>{{ Team or person }}</td>
726
+ </tr>
727
+ <tr>
728
+ <td>{{ Hardware checks }}</td>
729
+ <td>{{ Frequency }}</td>
730
+ <td>{{ Team or person }}</td>
731
+ </tr>
732
+ <tr>
733
+ <td>{{ Backup validation }}</td>
734
+ <td>{{ Frequency }}</td>
735
+ <td>{{ Team or person }}</td>
736
+ </tr>
737
+ </tbody>
738
+ </table>
739
+ </div>
740
+ <div>
741
+ <h2>Escalation path</h2>
742
+ <ol>
743
+ <li>Identify severity and capture logs.</li>
744
+ <li>Notify primary on-call channel.</li>
745
+ <li>Engage platform support or vendor partner.</li>
746
+ </ol>
747
+ </div>
748
+ <div>
749
+ <h2>Reference commands</h2>
750
+ <pre><code class="language-bash"># Replace placeholders with tenant specific values
751
+ check-sync --endpoint {{ endpoint }}
752
+ validate-health --node {{ node-id }}
753
+ </code></pre>
754
+ </div>
755
+ </div>
756
+ </section>
757
+ `.trim()
758
+ },
759
+ archive: {
760
+ summary: 'Template for archival timelines and historical notes across releases or initiatives.',
761
+ render: (title) => `
762
+ <section class="section doc" data-template="archive">
763
+ <div class="doc-content">
764
+ <header>
765
+ <p class="eyebrow">Archive template</p>
766
+ <h1>${title}</h1>
767
+ <p class="lead">Record key milestones, artifacts, and retrospective notes for posterity.</p>
768
+ </header>
769
+ <div>
770
+ <h2>Milestones</h2>
771
+ <dl>
772
+ <dt>{{ 2023-01 }}</dt>
773
+ <dd>Summarize the release or initiative.</dd>
774
+ <dt>{{ 2023-06 }}</dt>
775
+ <dd>Highlight notable learnings.</dd>
776
+ <dt>{{ 2023-12 }}</dt>
777
+ <dd>Capture outcomes and follow-up actions.</dd>
778
+ </dl>
779
+ </div>
780
+ <div>
781
+ <h2>Artifacts</h2>
782
+ <ul>
783
+ <li>{{ Link to design doc }}</li>
784
+ <li>{{ Link to demo recording }}</li>
785
+ <li>{{ Link to postmortem }}</li>
786
+ </ul>
787
+ </div>
788
+ <div>
789
+ <h2>Future considerations</h2>
790
+ <blockquote>
791
+ <p>Document open questions or unresolved ideas worth revisiting.</p>
792
+ </blockquote>
793
+ </div>
794
+ </div>
795
+ </section>
796
+ `.trim()
797
+ },
798
+ default: {
799
+ summary: 'Flexible documentation template to capture narrative, lists, and structured data.',
800
+ render: (title) => `
801
+ <section class="section doc" data-template="general">
802
+ <div class="doc-content">
803
+ <header>
804
+ <p class="eyebrow">Documentation template</p>
805
+ <h1>${title}</h1>
806
+ <p class="lead">Adapt this flexible layout to communicate policies, notes, or supporting context.</p>
807
+ </header>
808
+ <div>
809
+ <h2>Overview</h2>
810
+ <p>Summarize the topic in one or two paragraphs.</p>
811
+ </div>
812
+ <div>
813
+ <h2>Key points</h2>
814
+ <ul>
815
+ <li>{{ Highlight a key decision }}</li>
816
+ <li>{{ Capture a supporting metric }}</li>
817
+ <li>{{ Reference a related doc }}</li>
818
+ </ul>
819
+ </div>
820
+ <div>
821
+ <h2>Details</h2>
822
+ <table>
823
+ <thead>
824
+ <tr>
825
+ <th>Item</th>
826
+ <th>Description</th>
827
+ <th>Owner</th>
828
+ </tr>
829
+ </thead>
830
+ <tbody>
831
+ <tr>
832
+ <td>{{ Topic }}</td>
833
+ <td>{{ Notes }}</td>
834
+ <td>{{ Team }}</td>
835
+ </tr>
836
+ <tr>
837
+ <td>{{ Topic }}</td>
838
+ <td>{{ Notes }}</td>
839
+ <td>{{ Team }}</td>
840
+ </tr>
841
+ </tbody>
842
+ </table>
843
+ </div>
844
+ </div>
845
+ </section>
846
+ `.trim()
847
+ }
848
+ };
849
+
850
+ export function getSectionMetadata(id, overrides = {}) {
851
+ const category = inferCategory(id);
852
+ const config = CATEGORY_CONFIG[category] || CATEGORY_CONFIG.default;
853
+ return {
854
+ id,
855
+ title: overrides.title || titleFromId(id),
856
+ summary: overrides.summary || config.summary,
857
+ category
858
+ };
859
+ }
860
+
861
+ // Re-export for backward compatibility
862
+ export { titleFromId } from '../lib/categories.js';
863
+
864
+ export function renderSectionTemplate({ id, title }) {
865
+ const metadata = getSectionMetadata(id, { title });
866
+ const config = CATEGORY_CONFIG[metadata.category] || CATEGORY_CONFIG.default;
867
+ const finalTitle = metadata.title;
868
+ return config.render(finalTitle, metadata).trim();
869
+ }
870
+
871
+ export function ensureCategory(id) {
872
+ return getSectionMetadata(id).category;
873
+ }