@x12i/mdreports-docs 0.3.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.
@@ -0,0 +1,937 @@
1
+ export const catalog = {
2
+ "roles": [
3
+ {
4
+ "id": "developers",
5
+ "label": "Developers",
6
+ "tagline": "Ship renders in code",
7
+ "description": "Engineers wiring the SDK, CLI, HTTP API, or MCP server — packages, options, and integration patterns."
8
+ },
9
+ {
10
+ "id": "builders",
11
+ "label": "Builders",
12
+ "tagline": "Shape templates & docs",
13
+ "description": "Authors and template designers using Playground/Studio and custom HTML+CSS layouts without living in the renderer source."
14
+ }
15
+ ],
16
+ "families": [
17
+ {
18
+ "id": "mdreports",
19
+ "name": "Markdown Reports Studio",
20
+ "tagline": "Markdown in → branded PDF, DOCX, PPTX, HTML out.",
21
+ "description": "One rendering engine across SDK, CLI, HTTP API, MCP, Playground, and Studio.",
22
+ "color": "#1a3a52"
23
+ }
24
+ ],
25
+ "books": [
26
+ {
27
+ "id": "00-overview",
28
+ "familyId": "mdreports",
29
+ "audiences": [
30
+ "developers",
31
+ "builders"
32
+ ],
33
+ "status": "available",
34
+ "kicker": "CASE FILE · MDR-00",
35
+ "title": "Overview",
36
+ "subtitle": "What the product is",
37
+ "blurb": "Surfaces, formats, and the render pipeline — where Markdown Reports Studio fits.",
38
+ "tags": [
39
+ "platform",
40
+ "start-here",
41
+ "overview"
42
+ ],
43
+ "color": "#1a3a52",
44
+ "dir": "00-overview"
45
+ },
46
+ {
47
+ "id": "01-packages",
48
+ "familyId": "mdreports",
49
+ "audiences": [
50
+ "developers"
51
+ ],
52
+ "status": "available",
53
+ "kicker": "CASE FILE · MDR-01",
54
+ "title": "Packages",
55
+ "subtitle": "The @x12i/mdreports-* map",
56
+ "blurb": "Which npm package to install for SDK, CLI, API, client, MCP, types, and templates.",
57
+ "tags": [
58
+ "packages",
59
+ "npm"
60
+ ],
61
+ "color": "#1f6e5c",
62
+ "dir": "01-packages"
63
+ },
64
+ {
65
+ "id": "02-getting-started",
66
+ "familyId": "mdreports",
67
+ "audiences": [
68
+ "developers",
69
+ "builders"
70
+ ],
71
+ "status": "available",
72
+ "kicker": "CASE FILE · MDR-02",
73
+ "title": "Getting Started",
74
+ "subtitle": "Pick a surface and render",
75
+ "blurb": "CLI, SDK, HTTP API, or MCP — first successful PDF/DOCX/PPTX in minutes.",
76
+ "tags": [
77
+ "getting-started",
78
+ "quickstart"
79
+ ],
80
+ "color": "#a5710f",
81
+ "dir": "02-getting-started"
82
+ },
83
+ {
84
+ "id": "03-sdk",
85
+ "familyId": "mdreports",
86
+ "audiences": [
87
+ "developers"
88
+ ],
89
+ "status": "available",
90
+ "kicker": "CASE FILE · MDR-03",
91
+ "title": "SDK",
92
+ "subtitle": "@x12i/mdreports-core",
93
+ "blurb": "In-process HTML/PDF/DOCX/PPTX render, TemplateStore, and create-from-image.",
94
+ "tags": [
95
+ "sdk",
96
+ "node",
97
+ "core"
98
+ ],
99
+ "color": "#2d5a87",
100
+ "dir": "03-sdk"
101
+ },
102
+ {
103
+ "id": "04-cli",
104
+ "familyId": "mdreports",
105
+ "audiences": [
106
+ "developers"
107
+ ],
108
+ "status": "available",
109
+ "kicker": "CASE FILE · MDR-04",
110
+ "title": "CLI",
111
+ "subtitle": "mdreports command reference",
112
+ "blurb": "Render from the shell and manage templates with create-from-html / create-from-image.",
113
+ "tags": [
114
+ "cli",
115
+ "shell"
116
+ ],
117
+ "color": "#3d6b4f",
118
+ "dir": "04-cli"
119
+ },
120
+ {
121
+ "id": "05-api",
122
+ "familyId": "mdreports",
123
+ "audiences": [
124
+ "developers"
125
+ ],
126
+ "status": "available",
127
+ "kicker": "CASE FILE · MDR-05",
128
+ "title": "HTTP API",
129
+ "subtitle": "Service + typed client",
130
+ "blurb": "Run mdreports-api and call it with curl or @x12i/mdreports-api-client.",
131
+ "tags": [
132
+ "api",
133
+ "http",
134
+ "client"
135
+ ],
136
+ "color": "#b14a2c",
137
+ "dir": "05-api"
138
+ },
139
+ {
140
+ "id": "06-mcp",
141
+ "familyId": "mdreports",
142
+ "audiences": [
143
+ "developers"
144
+ ],
145
+ "status": "available",
146
+ "kicker": "CASE FILE · MDR-06",
147
+ "title": "MCP",
148
+ "subtitle": "Agent tools over stdio",
149
+ "blurb": "Wire @x12i/mdreports-mcp-server into Cursor or Claude for render and template tools.",
150
+ "tags": [
151
+ "mcp",
152
+ "agents"
153
+ ],
154
+ "color": "#5b3d8f",
155
+ "dir": "06-mcp"
156
+ },
157
+ {
158
+ "id": "07-templates",
159
+ "familyId": "mdreports",
160
+ "audiences": [
161
+ "developers",
162
+ "builders"
163
+ ],
164
+ "status": "available",
165
+ "kicker": "CASE FILE · MDR-07",
166
+ "title": "Templates",
167
+ "subtitle": "Built-ins, slots, custom layouts",
168
+ "blurb": "Template directory contract, built-ins, user store, and PPTX slide rules.",
169
+ "tags": [
170
+ "templates",
171
+ "html",
172
+ "css"
173
+ ],
174
+ "color": "#1a3a52",
175
+ "dir": "07-templates",
176
+ "buildersPrimary": true
177
+ }
178
+ ]
179
+ };
180
+ export const useCases = {
181
+ "useCases": [
182
+ {
183
+ "id": "orient-mdreports",
184
+ "title": "Orient on Markdown Reports Studio",
185
+ "goal": "Understand formats, surfaces, and the one render pipeline before installing anything.",
186
+ "audiences": [
187
+ "developers",
188
+ "builders"
189
+ ],
190
+ "tags": [
191
+ "platform",
192
+ "start-here"
193
+ ],
194
+ "path": [
195
+ {
196
+ "bookId": "00-overview",
197
+ "audience": "developers",
198
+ "chapters": [
199
+ "1-what-it-is",
200
+ "2-formats-and-surfaces",
201
+ "3-how-rendering-works",
202
+ "4-where-to-go-next"
203
+ ]
204
+ }
205
+ ],
206
+ "alsoSee": [
207
+ "00-overview",
208
+ "02-getting-started"
209
+ ],
210
+ "prerequisites": [],
211
+ "successCriteria": [],
212
+ "nextUseCases": [],
213
+ "scenarioIds": [],
214
+ "guideIds": [],
215
+ "troubleshooting": []
216
+ },
217
+ {
218
+ "id": "pick-a-surface",
219
+ "title": "Pick a surface and first render",
220
+ "goal": "Choose CLI, SDK, API, or MCP and produce a first PDF/DOCX/PPTX.",
221
+ "audiences": [
222
+ "developers",
223
+ "builders"
224
+ ],
225
+ "tags": [
226
+ "getting-started",
227
+ "quickstart"
228
+ ],
229
+ "path": [
230
+ {
231
+ "bookId": "02-getting-started",
232
+ "audience": "developers",
233
+ "chapters": [
234
+ "1-prerequisites",
235
+ "2-option-a-cli",
236
+ "3-option-b-sdk",
237
+ "4-option-c-http-api",
238
+ "5-option-d-mcp",
239
+ "6-built-in-templates"
240
+ ]
241
+ }
242
+ ],
243
+ "alsoSee": [
244
+ "01-packages",
245
+ "02-getting-started"
246
+ ],
247
+ "prerequisites": [],
248
+ "successCriteria": [],
249
+ "nextUseCases": [],
250
+ "scenarioIds": [],
251
+ "guideIds": [],
252
+ "troubleshooting": []
253
+ },
254
+ {
255
+ "id": "map-packages",
256
+ "title": "Map the @x12i/mdreports-* packages",
257
+ "goal": "Know which npm package owns core, CLI, API, client, MCP, types, and templates.",
258
+ "audiences": [
259
+ "developers"
260
+ ],
261
+ "tags": [
262
+ "packages",
263
+ "npm"
264
+ ],
265
+ "path": [
266
+ {
267
+ "bookId": "01-packages",
268
+ "audience": "developers",
269
+ "chapters": [
270
+ "1-package-table",
271
+ "2-dependency-shape",
272
+ "3-naming-note"
273
+ ]
274
+ }
275
+ ],
276
+ "alsoSee": [
277
+ "01-packages"
278
+ ],
279
+ "prerequisites": [],
280
+ "successCriteria": [],
281
+ "nextUseCases": [],
282
+ "scenarioIds": [],
283
+ "guideIds": [],
284
+ "troubleshooting": []
285
+ },
286
+ {
287
+ "id": "render-with-sdk",
288
+ "title": "Render in-process with the SDK",
289
+ "goal": "Call renderToHtml/Pdf/Docx/Pptx, shut down Chromium, and use TemplateStore.",
290
+ "audiences": [
291
+ "developers"
292
+ ],
293
+ "tags": [
294
+ "sdk",
295
+ "core"
296
+ ],
297
+ "path": [
298
+ {
299
+ "bookId": "03-sdk",
300
+ "audience": "developers",
301
+ "chapters": [
302
+ "1-install",
303
+ "2-render",
304
+ "3-template-store",
305
+ "4-ai-template-from-image"
306
+ ]
307
+ }
308
+ ],
309
+ "alsoSee": [
310
+ "03-sdk",
311
+ "07-templates"
312
+ ],
313
+ "prerequisites": [],
314
+ "successCriteria": [],
315
+ "nextUseCases": [],
316
+ "scenarioIds": [],
317
+ "guideIds": [],
318
+ "troubleshooting": []
319
+ },
320
+ {
321
+ "id": "render-with-cli",
322
+ "title": "Render from the CLI",
323
+ "goal": "Use mdreports render and templates commands from the shell.",
324
+ "audiences": [
325
+ "developers"
326
+ ],
327
+ "tags": [
328
+ "cli"
329
+ ],
330
+ "path": [
331
+ {
332
+ "bookId": "04-cli",
333
+ "audience": "developers",
334
+ "chapters": [
335
+ "1-install",
336
+ "2-render",
337
+ "3-templates"
338
+ ]
339
+ }
340
+ ],
341
+ "alsoSee": [
342
+ "04-cli"
343
+ ],
344
+ "prerequisites": [],
345
+ "successCriteria": [],
346
+ "nextUseCases": [],
347
+ "scenarioIds": [],
348
+ "guideIds": [],
349
+ "troubleshooting": []
350
+ },
351
+ {
352
+ "id": "call-http-api",
353
+ "title": "Run and call the HTTP API",
354
+ "goal": "Start mdreports-api and render via curl or the typed client.",
355
+ "audiences": [
356
+ "developers"
357
+ ],
358
+ "tags": [
359
+ "api",
360
+ "http"
361
+ ],
362
+ "path": [
363
+ {
364
+ "bookId": "05-api",
365
+ "audience": "developers",
366
+ "chapters": [
367
+ "1-run",
368
+ "2-call-with-curl",
369
+ "3-typed-client",
370
+ "4-route-summary"
371
+ ]
372
+ }
373
+ ],
374
+ "alsoSee": [
375
+ "05-api"
376
+ ],
377
+ "prerequisites": [],
378
+ "successCriteria": [],
379
+ "nextUseCases": [],
380
+ "scenarioIds": [],
381
+ "guideIds": [],
382
+ "troubleshooting": []
383
+ },
384
+ {
385
+ "id": "wire-mcp-agents",
386
+ "title": "Wire MCP tools for agents",
387
+ "goal": "Install the MCP server and expose render/template tools to Cursor or Claude.",
388
+ "audiences": [
389
+ "developers"
390
+ ],
391
+ "tags": [
392
+ "mcp",
393
+ "agents"
394
+ ],
395
+ "path": [
396
+ {
397
+ "bookId": "06-mcp",
398
+ "audience": "developers",
399
+ "chapters": [
400
+ "1-run-configure",
401
+ "2-tools"
402
+ ]
403
+ }
404
+ ],
405
+ "alsoSee": [
406
+ "06-mcp"
407
+ ],
408
+ "prerequisites": [],
409
+ "successCriteria": [],
410
+ "nextUseCases": [],
411
+ "scenarioIds": [],
412
+ "guideIds": [],
413
+ "troubleshooting": []
414
+ },
415
+ {
416
+ "id": "author-templates",
417
+ "title": "Author and store templates",
418
+ "goal": "Understand the template directory contract, built-ins, user store, and PPTX rules.",
419
+ "audiences": [
420
+ "developers",
421
+ "builders"
422
+ ],
423
+ "tags": [
424
+ "templates",
425
+ "studio"
426
+ ],
427
+ "path": [
428
+ {
429
+ "bookId": "07-templates",
430
+ "audience": "builders",
431
+ "chapters": [
432
+ "1-built-ins",
433
+ "2-layout-contract",
434
+ "3-user-templates",
435
+ "4-images-in-markdown",
436
+ "5-pptx"
437
+ ]
438
+ }
439
+ ],
440
+ "alsoSee": [
441
+ "07-templates"
442
+ ],
443
+ "prerequisites": [],
444
+ "successCriteria": [],
445
+ "nextUseCases": [],
446
+ "scenarioIds": [],
447
+ "guideIds": [],
448
+ "troubleshooting": []
449
+ }
450
+ ]
451
+ };
452
+ export const site = {
453
+ "product": "mdreports",
454
+ "brand": "x12i · Markdown Reports Studio",
455
+ "brandAccent": "mdreports",
456
+ "siteUrl": "https://docs.mdreports.x12i.com",
457
+ "knowledgePackage": "@x12i/mdreports-docs",
458
+ "footer": "Markdown Reports Studio",
459
+ "accent": "oklch(45% 0.08 230)",
460
+ "accentAlt": "oklch(55% 0.12 55)",
461
+ "productUrl": "https://github.com/x12i/markdown-reports-studio",
462
+ "nav": [
463
+ {
464
+ "label": "Getting started",
465
+ "href": "/getting-started"
466
+ },
467
+ {
468
+ "label": "Use cases",
469
+ "href": "/use-cases"
470
+ },
471
+ {
472
+ "label": "Catalog",
473
+ "href": "/catalog"
474
+ }
475
+ ],
476
+ "footerLinks": [
477
+ {
478
+ "label": "Docs home",
479
+ "href": "/docs"
480
+ },
481
+ {
482
+ "label": "Getting started",
483
+ "href": "/getting-started"
484
+ },
485
+ {
486
+ "label": "Use cases",
487
+ "href": "/use-cases"
488
+ },
489
+ {
490
+ "label": "Catalog",
491
+ "href": "/catalog"
492
+ },
493
+ {
494
+ "label": "Agents/SDK",
495
+ "href": "/agents"
496
+ },
497
+ {
498
+ "label": "GitHub",
499
+ "href": "https://github.com/x12i/markdown-reports-studio"
500
+ }
501
+ ]
502
+ };
503
+ export const manifest = {
504
+ "version": 1,
505
+ "product": "mdreports",
506
+ "site": "https://docs.mdreports.x12i.com",
507
+ "knowledgePackage": "@x12i/mdreports-docs",
508
+ "roles": [
509
+ "developers",
510
+ "builders"
511
+ ],
512
+ "books": [
513
+ {
514
+ "id": "00-overview",
515
+ "audiences": [
516
+ "developers",
517
+ "builders"
518
+ ],
519
+ "md": {
520
+ "developers": "downloads/books/00-overview/developers.md",
521
+ "builders": "downloads/books/00-overview/builders.md"
522
+ },
523
+ "pdf": {
524
+ "developers": null,
525
+ "builders": null
526
+ },
527
+ "chapters": {
528
+ "developers": "downloads/books/00-overview/developers.chapters.json",
529
+ "builders": "downloads/books/00-overview/builders.chapters.json"
530
+ }
531
+ },
532
+ {
533
+ "id": "01-packages",
534
+ "audiences": [
535
+ "developers"
536
+ ],
537
+ "md": {
538
+ "developers": "downloads/books/01-packages/developers.md"
539
+ },
540
+ "pdf": {
541
+ "developers": null
542
+ },
543
+ "chapters": {
544
+ "developers": "downloads/books/01-packages/developers.chapters.json"
545
+ }
546
+ },
547
+ {
548
+ "id": "02-getting-started",
549
+ "audiences": [
550
+ "developers",
551
+ "builders"
552
+ ],
553
+ "md": {
554
+ "developers": "downloads/books/02-getting-started/developers.md",
555
+ "builders": "downloads/books/02-getting-started/builders.md"
556
+ },
557
+ "pdf": {
558
+ "developers": null,
559
+ "builders": null
560
+ },
561
+ "chapters": {
562
+ "developers": "downloads/books/02-getting-started/developers.chapters.json",
563
+ "builders": "downloads/books/02-getting-started/builders.chapters.json"
564
+ }
565
+ },
566
+ {
567
+ "id": "03-sdk",
568
+ "audiences": [
569
+ "developers"
570
+ ],
571
+ "md": {
572
+ "developers": "downloads/books/03-sdk/developers.md"
573
+ },
574
+ "pdf": {
575
+ "developers": null
576
+ },
577
+ "chapters": {
578
+ "developers": "downloads/books/03-sdk/developers.chapters.json"
579
+ }
580
+ },
581
+ {
582
+ "id": "04-cli",
583
+ "audiences": [
584
+ "developers"
585
+ ],
586
+ "md": {
587
+ "developers": "downloads/books/04-cli/developers.md"
588
+ },
589
+ "pdf": {
590
+ "developers": null
591
+ },
592
+ "chapters": {
593
+ "developers": "downloads/books/04-cli/developers.chapters.json"
594
+ }
595
+ },
596
+ {
597
+ "id": "05-api",
598
+ "audiences": [
599
+ "developers"
600
+ ],
601
+ "md": {
602
+ "developers": "downloads/books/05-api/developers.md"
603
+ },
604
+ "pdf": {
605
+ "developers": null
606
+ },
607
+ "chapters": {
608
+ "developers": "downloads/books/05-api/developers.chapters.json"
609
+ }
610
+ },
611
+ {
612
+ "id": "06-mcp",
613
+ "audiences": [
614
+ "developers"
615
+ ],
616
+ "md": {
617
+ "developers": "downloads/books/06-mcp/developers.md"
618
+ },
619
+ "pdf": {
620
+ "developers": null
621
+ },
622
+ "chapters": {
623
+ "developers": "downloads/books/06-mcp/developers.chapters.json"
624
+ }
625
+ },
626
+ {
627
+ "id": "07-templates",
628
+ "audiences": [
629
+ "developers",
630
+ "builders"
631
+ ],
632
+ "md": {
633
+ "developers": "downloads/books/07-templates/developers.md",
634
+ "builders": "downloads/books/07-templates/builders.md"
635
+ },
636
+ "pdf": {
637
+ "developers": null,
638
+ "builders": null
639
+ },
640
+ "chapters": {
641
+ "developers": "downloads/books/07-templates/developers.chapters.json",
642
+ "builders": "downloads/books/07-templates/builders.chapters.json"
643
+ }
644
+ }
645
+ ],
646
+ "useCases": [
647
+ {
648
+ "id": "orient-mdreports",
649
+ "title": "Orient on Markdown Reports Studio",
650
+ "md": "downloads/use-cases/orient-mdreports.md",
651
+ "path": [
652
+ {
653
+ "bookId": "00-overview",
654
+ "audience": "developers",
655
+ "chapters": [
656
+ "1-what-it-is",
657
+ "2-formats-and-surfaces",
658
+ "3-how-rendering-works",
659
+ "4-where-to-go-next"
660
+ ]
661
+ }
662
+ ]
663
+ },
664
+ {
665
+ "id": "pick-a-surface",
666
+ "title": "Pick a surface and first render",
667
+ "md": "downloads/use-cases/pick-a-surface.md",
668
+ "path": [
669
+ {
670
+ "bookId": "02-getting-started",
671
+ "audience": "developers",
672
+ "chapters": [
673
+ "1-prerequisites",
674
+ "2-option-a-cli",
675
+ "3-option-b-sdk",
676
+ "4-option-c-http-api",
677
+ "5-option-d-mcp",
678
+ "6-built-in-templates"
679
+ ]
680
+ }
681
+ ]
682
+ },
683
+ {
684
+ "id": "map-packages",
685
+ "title": "Map the @x12i/mdreports-* packages",
686
+ "md": "downloads/use-cases/map-packages.md",
687
+ "path": [
688
+ {
689
+ "bookId": "01-packages",
690
+ "audience": "developers",
691
+ "chapters": [
692
+ "1-package-table",
693
+ "2-dependency-shape",
694
+ "3-naming-note"
695
+ ]
696
+ }
697
+ ]
698
+ },
699
+ {
700
+ "id": "render-with-sdk",
701
+ "title": "Render in-process with the SDK",
702
+ "md": "downloads/use-cases/render-with-sdk.md",
703
+ "path": [
704
+ {
705
+ "bookId": "03-sdk",
706
+ "audience": "developers",
707
+ "chapters": [
708
+ "1-install",
709
+ "2-render",
710
+ "3-template-store",
711
+ "4-ai-template-from-image"
712
+ ]
713
+ }
714
+ ]
715
+ },
716
+ {
717
+ "id": "render-with-cli",
718
+ "title": "Render from the CLI",
719
+ "md": "downloads/use-cases/render-with-cli.md",
720
+ "path": [
721
+ {
722
+ "bookId": "04-cli",
723
+ "audience": "developers",
724
+ "chapters": [
725
+ "1-install",
726
+ "2-render",
727
+ "3-templates"
728
+ ]
729
+ }
730
+ ]
731
+ },
732
+ {
733
+ "id": "call-http-api",
734
+ "title": "Run and call the HTTP API",
735
+ "md": "downloads/use-cases/call-http-api.md",
736
+ "path": [
737
+ {
738
+ "bookId": "05-api",
739
+ "audience": "developers",
740
+ "chapters": [
741
+ "1-run",
742
+ "2-call-with-curl",
743
+ "3-typed-client",
744
+ "4-route-summary"
745
+ ]
746
+ }
747
+ ]
748
+ },
749
+ {
750
+ "id": "wire-mcp-agents",
751
+ "title": "Wire MCP tools for agents",
752
+ "md": "downloads/use-cases/wire-mcp-agents.md",
753
+ "path": [
754
+ {
755
+ "bookId": "06-mcp",
756
+ "audience": "developers",
757
+ "chapters": [
758
+ "1-run-configure",
759
+ "2-tools"
760
+ ]
761
+ }
762
+ ]
763
+ },
764
+ {
765
+ "id": "author-templates",
766
+ "title": "Author and store templates",
767
+ "md": "downloads/use-cases/author-templates.md",
768
+ "path": [
769
+ {
770
+ "bookId": "07-templates",
771
+ "audience": "builders",
772
+ "chapters": [
773
+ "1-built-ins",
774
+ "2-layout-contract",
775
+ "3-user-templates",
776
+ "4-images-in-markdown",
777
+ "5-pptx"
778
+ ]
779
+ }
780
+ ]
781
+ }
782
+ ],
783
+ "indexes": {
784
+ "indexMd": "INDEX.md",
785
+ "searchJson": "SEARCH.json"
786
+ },
787
+ "concepts": [
788
+ {
789
+ "id": "render-pipeline",
790
+ "title": "Render pipeline",
791
+ "md": "concepts/render-pipeline.md"
792
+ }
793
+ ],
794
+ "guides": [
795
+ {
796
+ "id": "pick-a-surface",
797
+ "title": "Pick a surface",
798
+ "md": "guides/pick-a-surface.md"
799
+ }
800
+ ],
801
+ "scenarios": [
802
+ {
803
+ "id": "choose-integrate-or-ui",
804
+ "title": "Choose integrate-or-UI path",
805
+ "md": "scenarios/choose-integrate-or-ui.md"
806
+ }
807
+ ],
808
+ "decisions": [],
809
+ "glossary": [],
810
+ "visuals": [],
811
+ "diagrams": [],
812
+ "relationships": [],
813
+ "tutorials": [],
814
+ "examples": [],
815
+ "sampleData": [],
816
+ "uiClients": [],
817
+ "apis": [],
818
+ "packs": [
819
+ {
820
+ "id": "concept/render-pipeline",
821
+ "type": "concept",
822
+ "path": "packs/concept/render-pipeline"
823
+ },
824
+ {
825
+ "id": "guide/pick-a-surface",
826
+ "type": "guide",
827
+ "path": "packs/guide/pick-a-surface"
828
+ },
829
+ {
830
+ "id": "scenario/choose-integrate-or-ui",
831
+ "type": "scenario",
832
+ "path": "packs/scenario/choose-integrate-or-ui"
833
+ }
834
+ ]
835
+ };
836
+ export const files = {
837
+ "agent/agent-manifest.json": "{\n \"version\": 1,\n \"product\": \"mdreports\",\n \"site\": \"https://docs.mdreports.x12i.com\",\n \"knowledgePackage\": \"@x12i/mdreports-docs\",\n \"roles\": [\n \"developers\",\n \"builders\"\n ],\n \"books\": [\n {\n \"id\": \"00-overview\",\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/00-overview/developers.md\",\n \"builders\": \"downloads/books/00-overview/builders.md\"\n },\n \"pdf\": {\n \"developers\": null,\n \"builders\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/00-overview/developers.chapters.json\",\n \"builders\": \"downloads/books/00-overview/builders.chapters.json\"\n }\n },\n {\n \"id\": \"01-packages\",\n \"audiences\": [\n \"developers\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/01-packages/developers.md\"\n },\n \"pdf\": {\n \"developers\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/01-packages/developers.chapters.json\"\n }\n },\n {\n \"id\": \"02-getting-started\",\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/02-getting-started/developers.md\",\n \"builders\": \"downloads/books/02-getting-started/builders.md\"\n },\n \"pdf\": {\n \"developers\": null,\n \"builders\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/02-getting-started/developers.chapters.json\",\n \"builders\": \"downloads/books/02-getting-started/builders.chapters.json\"\n }\n },\n {\n \"id\": \"03-sdk\",\n \"audiences\": [\n \"developers\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/03-sdk/developers.md\"\n },\n \"pdf\": {\n \"developers\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/03-sdk/developers.chapters.json\"\n }\n },\n {\n \"id\": \"04-cli\",\n \"audiences\": [\n \"developers\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/04-cli/developers.md\"\n },\n \"pdf\": {\n \"developers\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/04-cli/developers.chapters.json\"\n }\n },\n {\n \"id\": \"05-api\",\n \"audiences\": [\n \"developers\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/05-api/developers.md\"\n },\n \"pdf\": {\n \"developers\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/05-api/developers.chapters.json\"\n }\n },\n {\n \"id\": \"06-mcp\",\n \"audiences\": [\n \"developers\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/06-mcp/developers.md\"\n },\n \"pdf\": {\n \"developers\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/06-mcp/developers.chapters.json\"\n }\n },\n {\n \"id\": \"07-templates\",\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/07-templates/developers.md\",\n \"builders\": \"downloads/books/07-templates/builders.md\"\n },\n \"pdf\": {\n \"developers\": null,\n \"builders\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/07-templates/developers.chapters.json\",\n \"builders\": \"downloads/books/07-templates/builders.chapters.json\"\n }\n }\n ],\n \"useCases\": [\n {\n \"id\": \"orient-mdreports\",\n \"title\": \"Orient on Markdown Reports Studio\",\n \"md\": \"downloads/use-cases/orient-mdreports.md\",\n \"path\": [\n {\n \"bookId\": \"00-overview\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"1-what-it-is\",\n \"2-formats-and-surfaces\",\n \"3-how-rendering-works\",\n \"4-where-to-go-next\"\n ]\n }\n ]\n },\n {\n \"id\": \"pick-a-surface\",\n \"title\": \"Pick a surface and first render\",\n \"md\": \"downloads/use-cases/pick-a-surface.md\",\n \"path\": [\n {\n \"bookId\": \"02-getting-started\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"1-prerequisites\",\n \"2-option-a-cli\",\n \"3-option-b-sdk\",\n \"4-option-c-http-api\",\n \"5-option-d-mcp\",\n \"6-built-in-templates\"\n ]\n }\n ]\n },\n {\n \"id\": \"map-packages\",\n \"title\": \"Map the @x12i/mdreports-* packages\",\n \"md\": \"downloads/use-cases/map-packages.md\",\n \"path\": [\n {\n \"bookId\": \"01-packages\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"1-package-table\",\n \"2-dependency-shape\",\n \"3-naming-note\"\n ]\n }\n ]\n },\n {\n \"id\": \"render-with-sdk\",\n \"title\": \"Render in-process with the SDK\",\n \"md\": \"downloads/use-cases/render-with-sdk.md\",\n \"path\": [\n {\n \"bookId\": \"03-sdk\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"1-install\",\n \"2-render\",\n \"3-template-store\",\n \"4-ai-template-from-image\"\n ]\n }\n ]\n },\n {\n \"id\": \"render-with-cli\",\n \"title\": \"Render from the CLI\",\n \"md\": \"downloads/use-cases/render-with-cli.md\",\n \"path\": [\n {\n \"bookId\": \"04-cli\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"1-install\",\n \"2-render\",\n \"3-templates\"\n ]\n }\n ]\n },\n {\n \"id\": \"call-http-api\",\n \"title\": \"Run and call the HTTP API\",\n \"md\": \"downloads/use-cases/call-http-api.md\",\n \"path\": [\n {\n \"bookId\": \"05-api\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"1-run\",\n \"2-call-with-curl\",\n \"3-typed-client\",\n \"4-route-summary\"\n ]\n }\n ]\n },\n {\n \"id\": \"wire-mcp-agents\",\n \"title\": \"Wire MCP tools for agents\",\n \"md\": \"downloads/use-cases/wire-mcp-agents.md\",\n \"path\": [\n {\n \"bookId\": \"06-mcp\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"1-run-configure\",\n \"2-tools\"\n ]\n }\n ]\n },\n {\n \"id\": \"author-templates\",\n \"title\": \"Author and store templates\",\n \"md\": \"downloads/use-cases/author-templates.md\",\n \"path\": [\n {\n \"bookId\": \"07-templates\",\n \"audience\": \"builders\",\n \"chapters\": [\n \"1-built-ins\",\n \"2-layout-contract\",\n \"3-user-templates\",\n \"4-images-in-markdown\",\n \"5-pptx\"\n ]\n }\n ]\n }\n ],\n \"indexes\": {\n \"indexMd\": \"INDEX.md\",\n \"searchJson\": \"SEARCH.json\"\n },\n \"concepts\": [\n {\n \"id\": \"render-pipeline\",\n \"title\": \"Render pipeline\",\n \"md\": \"concepts/render-pipeline.md\"\n }\n ],\n \"guides\": [\n {\n \"id\": \"pick-a-surface\",\n \"title\": \"Pick a surface\",\n \"md\": \"guides/pick-a-surface.md\"\n }\n ],\n \"scenarios\": [\n {\n \"id\": \"choose-integrate-or-ui\",\n \"title\": \"Choose integrate-or-UI path\",\n \"md\": \"scenarios/choose-integrate-or-ui.md\"\n }\n ],\n \"decisions\": [],\n \"glossary\": [],\n \"visuals\": [],\n \"diagrams\": [],\n \"relationships\": [],\n \"tutorials\": [],\n \"examples\": [],\n \"sampleData\": [],\n \"uiClients\": [],\n \"apis\": [],\n \"packs\": [\n {\n \"id\": \"concept/render-pipeline\",\n \"type\": \"concept\",\n \"path\": \"packs/concept/render-pipeline\"\n },\n {\n \"id\": \"guide/pick-a-surface\",\n \"type\": \"guide\",\n \"path\": \"packs/guide/pick-a-surface\"\n },\n {\n \"id\": \"scenario/choose-integrate-or-ui\",\n \"type\": \"scenario\",\n \"path\": \"packs/scenario/choose-integrate-or-ui\"\n }\n ]\n}",
838
+ "agent/concepts/render-pipeline.md": "---\nid: \"render-pipeline\"\ntype: \"concept\"\ntitle: \"Render pipeline\"\nsummary: \"Markdown plus a template id becomes HTML, PDF, DOCX, or PPTX through one shared engine.\"\nproblem: \"Teams reimplement Markdown rendering per surface and drift on templates, slots, and export fidelity.\"\nwhy: \"One core (`@x12i/mdreports-core`) keeps CLI, API, MCP, Playground, and Studio on the same contract.\"\nmentalModel: \"Parse Markdown → load template → inject CSS/slots → emit the requested format.\"\naudiences: [\"developers\", \"builders\"]\nnext: [\"pick-a-surface\"]\n---\n# Render pipeline\n\n# Render pipeline\n\n## Answer\n\nMarkdown Reports Studio is a **render pipeline**: Markdown in, branded document out — not a CMS.\n\n## Problem\n\nWithout a shared engine, PDF/DOCX/HTML exports diverge per tool and templates stop composing.\n\n## Why\n\nSDK, CLI, HTTP API, MCP, Playground, and Studio all call the same core so template ids and frontmatter behave identically.\n\n## Mental model\n\n1. Parse Markdown (YAML frontmatter fills slots).\n2. Load a template (`layout.html` + `styles.css` + `template.json`).\n3. Inject CSS and fill slots (`<!--CONTENT-->`, `<!--TITLE-->`, meta slots).\n4. Emit HTML, PDF (Playwright), DOCX, or PPTX.\n\n## Example\n\n```ts\nimport { renderToPdf, shutdown } from \"@x12i/mdreports-core\";\n\nconst pdf = await renderToPdf(\"# Hello\", \"clean-report\");\nawait shutdown();\n```\n\n## How it works\n\nBuilt-in templates ship in `@x12i/mdreports-templates`. User templates live under `~/.mdreports/templates` (or `MDREPORTS_TEMPLATES_DIR`).\n\n## Next\n\nPick a surface — CLI for shells, SDK for Node, API for services, MCP for agents.",
839
+ "agent/guides/pick-a-surface.md": "---\nid: \"pick-a-surface\"\ntype: \"guide\"\ntitle: \"Pick a surface\"\nsummary: \"Choose CLI, SDK, HTTP API, MCP, Playground, or Studio for your first successful render.\"\nwhy: \"The same engine backs every surface — install only what your workflow needs.\"\naudiences: [\"developers\", \"builders\"]\nprerequisites: [\"render-pipeline\"]\nconfirmationRequired: false\n---\n# Pick a surface\n\n# Pick a surface\n\n## Use this when\n\nYou know you want Markdown → PDF/DOCX/PPTX/HTML and need the smallest install path.\n\n## Do not use this when\n\nYou are designing template HTML/CSS only — open Studio after a local `pnpm dev` instead.\n\n## Steps\n\n1. **CLI** — `npm i -g @x12i/mdreports-cli` then `mdreports render --in report.md --template clean-report --format pdf`.\n2. **SDK** — `npm i @x12i/mdreports-core` and call `renderToPdf` / `renderToDocx` / `renderToPptx` / `renderToHtml`.\n3. **HTTP API** — `npm i -g @x12i/mdreports-api` → `mdreports-api` on port **6460**; optional `@x12i/mdreports-api-client`.\n4. **MCP** — wire `@x12i/mdreports-mcp-server` into your agent client.\n5. **Playground / Studio** — from this monorepo, `pnpm dev` (:6461 / :6463).\n\nAlways install Chromium once for PDF: `npx playwright install chromium`.\n\n## Verification\n\nYou have a non-empty PDF/DOCX/PPTX/HTML file from the same Markdown + `clean-report` template.\n\n## Recovery\n\nIf PDF fails, reinstall Chromium. If a template is missing, `mdreports templates list` and confirm built-ins or your `MDREPORTS_TEMPLATES_DIR`.",
840
+ "agent/INDEX.md": "# mdreports — knowledge index\n\nPackage: `@x12i/mdreports-docs`\n\n## How to choose\n\n- **Concept** — what it is and why it exists\n- **Guide** — bounded task procedure\n- **Scenario** — state + evidence → which path\n- **Use case** — end-to-end outcome\n- **Tutorial** — learn by doing\n- **Decision** — options and recommended default\n- **Reference / API** — exact technical detail\n\n## Manifest and search\n\n- `agent-manifest.json`\n- `SEARCH.json`\n\n## Concepts\n\n- `render-pipeline` — **Render pipeline** — Markdown plus a template id becomes HTML, PDF, DOCX, or PPTX through one shared engine. — [concepts/render-pipeline.md](concepts/render-pipeline.md)\n\n## Guides\n\n- `pick-a-surface` — **Pick a surface** — Choose CLI, SDK, HTTP API, MCP, Playground, or Studio for your first successful render. — [guides/pick-a-surface.md](guides/pick-a-surface.md)\n\n## Scenarios\n\n- `choose-integrate-or-ui` — **Choose integrate-or-UI path** — Decide whether to embed the engine in code or use the local UIs first. — [scenarios/choose-integrate-or-ui.md](scenarios/choose-integrate-or-ui.md)\n\n## Diagrams\n\n_None authored yet._\n\n## Tutorials\n\n_None authored yet._\n",
841
+ "agent/indexes/books.json": "{\n \"version\": 1,\n \"items\": [\n {\n \"id\": \"00-overview\",\n \"title\": \"Overview\",\n \"summary\": \"Surfaces, formats, and the render pipeline — where Markdown Reports Studio fits.\",\n \"path\": \"books/00-overview/\"\n },\n {\n \"id\": \"01-packages\",\n \"title\": \"Packages\",\n \"summary\": \"Which npm package to install for SDK, CLI, API, client, MCP, types, and templates.\",\n \"path\": \"books/01-packages/\"\n },\n {\n \"id\": \"02-getting-started\",\n \"title\": \"Getting Started\",\n \"summary\": \"CLI, SDK, HTTP API, or MCP — first successful PDF/DOCX/PPTX in minutes.\",\n \"path\": \"books/02-getting-started/\"\n },\n {\n \"id\": \"03-sdk\",\n \"title\": \"SDK\",\n \"summary\": \"In-process HTML/PDF/DOCX/PPTX render, TemplateStore, and create-from-image.\",\n \"path\": \"books/03-sdk/\"\n },\n {\n \"id\": \"04-cli\",\n \"title\": \"CLI\",\n \"summary\": \"Render from the shell and manage templates with create-from-html / create-from-image.\",\n \"path\": \"books/04-cli/\"\n },\n {\n \"id\": \"05-api\",\n \"title\": \"HTTP API\",\n \"summary\": \"Run mdreports-api and call it with curl or @x12i/mdreports-api-client.\",\n \"path\": \"books/05-api/\"\n },\n {\n \"id\": \"06-mcp\",\n \"title\": \"MCP\",\n \"summary\": \"Wire @x12i/mdreports-mcp-server into Cursor or Claude for render and template tools.\",\n \"path\": \"books/06-mcp/\"\n },\n {\n \"id\": \"07-templates\",\n \"title\": \"Templates\",\n \"summary\": \"Template directory contract, built-ins, user store, and PPTX slide rules.\",\n \"path\": \"books/07-templates/\"\n }\n ]\n}",
842
+ "agent/indexes/books.md": "# books\n\n- `00-overview` — Overview — Surfaces, formats, and the render pipeline — where Markdown Reports Studio fits.\n- `01-packages` — Packages — Which npm package to install for SDK, CLI, API, client, MCP, types, and templates.\n- `02-getting-started` — Getting Started — CLI, SDK, HTTP API, or MCP — first successful PDF/DOCX/PPTX in minutes.\n- `03-sdk` — SDK — In-process HTML/PDF/DOCX/PPTX render, TemplateStore, and create-from-image.\n- `04-cli` — CLI — Render from the shell and manage templates with create-from-html / create-from-image.\n- `05-api` — HTTP API — Run mdreports-api and call it with curl or @x12i/mdreports-api-client.\n- `06-mcp` — MCP — Wire @x12i/mdreports-mcp-server into Cursor or Claude for render and template tools.\n- `07-templates` — Templates — Template directory contract, built-ins, user store, and PPTX slide rules.\n",
843
+ "agent/indexes/concepts.json": "{\n \"version\": 1,\n \"items\": [\n {\n \"id\": \"render-pipeline\",\n \"title\": \"Render pipeline\",\n \"summary\": \"Markdown plus a template id becomes HTML, PDF, DOCX, or PPTX through one shared engine.\",\n \"path\": \"concepts/render-pipeline.md\"\n }\n ]\n}",
844
+ "agent/indexes/concepts.md": "# concepts\n\n- `render-pipeline` — Render pipeline — Markdown plus a template id becomes HTML, PDF, DOCX, or PPTX through one shared engine.\n",
845
+ "agent/indexes/diagrams.json": "{\n \"version\": 1,\n \"items\": []\n}",
846
+ "agent/indexes/diagrams.md": "# diagrams\n\n\n",
847
+ "agent/indexes/guides.json": "{\n \"version\": 1,\n \"items\": [\n {\n \"id\": \"pick-a-surface\",\n \"title\": \"Pick a surface\",\n \"summary\": \"Choose CLI, SDK, HTTP API, MCP, Playground, or Studio for your first successful render.\",\n \"path\": \"guides/pick-a-surface.md\"\n }\n ]\n}",
848
+ "agent/indexes/guides.md": "# guides\n\n- `pick-a-surface` — Pick a surface — Choose CLI, SDK, HTTP API, MCP, Playground, or Studio for your first successful render.\n",
849
+ "agent/indexes/scenarios.json": "{\n \"version\": 1,\n \"items\": [\n {\n \"id\": \"choose-integrate-or-ui\",\n \"title\": \"Choose integrate-or-UI path\",\n \"summary\": \"Decide whether to embed the engine in code or use the local UIs first.\",\n \"path\": \"scenarios/choose-integrate-or-ui.md\"\n }\n ]\n}",
850
+ "agent/indexes/scenarios.md": "# scenarios\n\n- `choose-integrate-or-ui` — Choose integrate-or-UI path — Decide whether to embed the engine in code or use the local UIs first.\n",
851
+ "agent/indexes/tutorials.json": "{\n \"version\": 1,\n \"items\": []\n}",
852
+ "agent/indexes/tutorials.md": "# tutorials\n\n\n",
853
+ "agent/indexes/use-cases.json": "{\n \"version\": 1,\n \"items\": [\n {\n \"id\": \"orient-mdreports\",\n \"title\": \"Orient on Markdown Reports Studio\",\n \"summary\": \"Understand formats, surfaces, and the one render pipeline before installing anything.\",\n \"path\": \"use-cases/orient-mdreports.md\"\n },\n {\n \"id\": \"pick-a-surface\",\n \"title\": \"Pick a surface and first render\",\n \"summary\": \"Choose CLI, SDK, API, or MCP and produce a first PDF/DOCX/PPTX.\",\n \"path\": \"use-cases/pick-a-surface.md\"\n },\n {\n \"id\": \"map-packages\",\n \"title\": \"Map the @x12i/mdreports-* packages\",\n \"summary\": \"Know which npm package owns core, CLI, API, client, MCP, types, and templates.\",\n \"path\": \"use-cases/map-packages.md\"\n },\n {\n \"id\": \"render-with-sdk\",\n \"title\": \"Render in-process with the SDK\",\n \"summary\": \"Call renderToHtml/Pdf/Docx/Pptx, shut down Chromium, and use TemplateStore.\",\n \"path\": \"use-cases/render-with-sdk.md\"\n },\n {\n \"id\": \"render-with-cli\",\n \"title\": \"Render from the CLI\",\n \"summary\": \"Use mdreports render and templates commands from the shell.\",\n \"path\": \"use-cases/render-with-cli.md\"\n },\n {\n \"id\": \"call-http-api\",\n \"title\": \"Run and call the HTTP API\",\n \"summary\": \"Start mdreports-api and render via curl or the typed client.\",\n \"path\": \"use-cases/call-http-api.md\"\n },\n {\n \"id\": \"wire-mcp-agents\",\n \"title\": \"Wire MCP tools for agents\",\n \"summary\": \"Install the MCP server and expose render/template tools to Cursor or Claude.\",\n \"path\": \"use-cases/wire-mcp-agents.md\"\n },\n {\n \"id\": \"author-templates\",\n \"title\": \"Author and store templates\",\n \"summary\": \"Understand the template directory contract, built-ins, user store, and PPTX rules.\",\n \"path\": \"use-cases/author-templates.md\"\n }\n ]\n}",
854
+ "agent/indexes/use-cases.md": "# use-cases\n\n- `orient-mdreports` — Orient on Markdown Reports Studio — Understand formats, surfaces, and the one render pipeline before installing anything.\n- `pick-a-surface` — Pick a surface and first render — Choose CLI, SDK, API, or MCP and produce a first PDF/DOCX/PPTX.\n- `map-packages` — Map the @x12i/mdreports-* packages — Know which npm package owns core, CLI, API, client, MCP, types, and templates.\n- `render-with-sdk` — Render in-process with the SDK — Call renderToHtml/Pdf/Docx/Pptx, shut down Chromium, and use TemplateStore.\n- `render-with-cli` — Render from the CLI — Use mdreports render and templates commands from the shell.\n- `call-http-api` — Run and call the HTTP API — Start mdreports-api and render via curl or the typed client.\n- `wire-mcp-agents` — Wire MCP tools for agents — Install the MCP server and expose render/template tools to Cursor or Claude.\n- `author-templates` — Author and store templates — Understand the template directory contract, built-ins, user store, and PPTX rules.\n",
855
+ "agent/packs/concept/render-pipeline/pack.json": "{\n \"id\": \"concept/render-pipeline\",\n \"type\": \"concept\",\n \"title\": \"Render pipeline\",\n \"summary\": \"Markdown plus a template id becomes HTML, PDF, DOCX, or PPTX through one shared engine.\",\n \"markdownPath\": \"concepts/render-pipeline.md\",\n \"files\": [\n \"concepts/render-pipeline.md\"\n ],\n \"related\": []\n}",
856
+ "agent/packs/concept/render-pipeline/PACK.md": "---\nid: \"concept/render-pipeline\"\ntype: \"pack\"\ntitle: \"Render pipeline\"\nsummary: \"Markdown plus a template id becomes HTML, PDF, DOCX, or PPTX through one shared engine.\"\n---\n# Pack: Render pipeline\n\nMarkdown plus a template id becomes HTML, PDF, DOCX, or PPTX through one shared engine.\n\nPrimary markdown: `concepts/render-pipeline.md`\n",
857
+ "agent/packs/guide/pick-a-surface/pack.json": "{\n \"id\": \"guide/pick-a-surface\",\n \"type\": \"guide\",\n \"title\": \"Pick a surface\",\n \"summary\": \"Choose CLI, SDK, HTTP API, MCP, Playground, or Studio for your first successful render.\",\n \"markdownPath\": \"guides/pick-a-surface.md\",\n \"files\": [\n \"guides/pick-a-surface.md\"\n ],\n \"related\": []\n}",
858
+ "agent/packs/guide/pick-a-surface/PACK.md": "---\nid: \"guide/pick-a-surface\"\ntype: \"pack\"\ntitle: \"Pick a surface\"\nsummary: \"Choose CLI, SDK, HTTP API, MCP, Playground, or Studio for your first successful render.\"\n---\n# Pack: Pick a surface\n\nChoose CLI, SDK, HTTP API, MCP, Playground, or Studio for your first successful render.\n\nPrimary markdown: `guides/pick-a-surface.md`\n",
859
+ "agent/packs/scenario/choose-integrate-or-ui/pack.json": "{\n \"id\": \"scenario/choose-integrate-or-ui\",\n \"type\": \"scenario\",\n \"title\": \"Choose integrate-or-UI path\",\n \"summary\": \"Decide whether to embed the engine in code or use the local UIs first.\",\n \"markdownPath\": \"scenarios/choose-integrate-or-ui.md\",\n \"files\": [\n \"scenarios/choose-integrate-or-ui.md\"\n ],\n \"related\": [\n \"pick-a-surface\"\n ]\n}",
860
+ "agent/packs/scenario/choose-integrate-or-ui/PACK.md": "---\nid: \"scenario/choose-integrate-or-ui\"\ntype: \"pack\"\ntitle: \"Choose integrate-or-UI path\"\nsummary: \"Decide whether to embed the engine in code or use the local UIs first.\"\n---\n# Pack: Choose integrate-or-UI path\n\nDecide whether to embed the engine in code or use the local UIs first.\n\nPrimary markdown: `scenarios/choose-integrate-or-ui.md`\n",
861
+ "agent/scenarios/choose-integrate-or-ui.md": "---\nid: \"choose-integrate-or-ui\"\ntype: \"scenario\"\ntitle: \"Choose integrate-or-UI path\"\nsummary: \"Decide whether to embed the engine in code or use the local UIs first.\"\naudiences: [\"developers\", \"builders\"]\n---\n# Choose integrate-or-UI path\n\n# Choose integrate-or-UI path\n\nStart with **Playground** only if you are iterating on Markdown/template look. Otherwise install the surface that matches how the document will be produced in production.\n\nFollow the Pick a surface guide for install commands.",
862
+ "agent/SEARCH.json": "{\n \"version\": 1,\n \"product\": \"mdreports\",\n \"generatedAt\": \"2026-07-26T12:49:20.367Z\",\n \"records\": [\n {\n \"id\": \"render-pipeline\",\n \"type\": \"concept\",\n \"title\": \"Render pipeline\",\n \"summary\": \"Markdown plus a template id becomes HTML, PDF, DOCX, or PPTX through one shared engine.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"tags\": [],\n \"goals\": [],\n \"path\": \"concepts/render-pipeline.md\",\n \"webPath\": \"/concepts/render-pipeline\",\n \"prerequisites\": [],\n \"related\": [],\n \"packIds\": [\n \"concept/render-pipeline\"\n ]\n },\n {\n \"id\": \"pick-a-surface\",\n \"type\": \"guide\",\n \"title\": \"Pick a surface\",\n \"summary\": \"Choose CLI, SDK, HTTP API, MCP, Playground, or Studio for your first successful render.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"tags\": [],\n \"goals\": [],\n \"path\": \"guides/pick-a-surface.md\",\n \"webPath\": \"/guides/pick-a-surface\",\n \"prerequisites\": [\n \"render-pipeline\"\n ],\n \"related\": [],\n \"packIds\": [\n \"guide/pick-a-surface\"\n ]\n },\n {\n \"id\": \"choose-integrate-or-ui\",\n \"type\": \"scenario\",\n \"title\": \"Choose integrate-or-UI path\",\n \"summary\": \"Decide whether to embed the engine in code or use the local UIs first.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"tags\": [],\n \"goals\": [\n \"Should you start in the local UIs or install a package surface?\"\n ],\n \"path\": \"scenarios/choose-integrate-or-ui.md\",\n \"webPath\": \"/scenarios/choose-integrate-or-ui\",\n \"prerequisites\": [\n \"render-pipeline\"\n ],\n \"related\": [\n \"pick-a-surface\"\n ],\n \"packIds\": [\n \"scenario/choose-integrate-or-ui\"\n ]\n },\n {\n \"id\": \"orient-mdreports\",\n \"type\": \"use-case\",\n \"title\": \"Orient on Markdown Reports Studio\",\n \"summary\": \"Understand formats, surfaces, and the one render pipeline before installing anything.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"tags\": [\n \"platform\",\n \"start-here\"\n ],\n \"goals\": [\n \"Understand formats, surfaces, and the one render pipeline before installing anything.\"\n ],\n \"path\": \"use-cases/orient-mdreports.md\",\n \"webPath\": \"/use-cases#orient-mdreports\",\n \"prerequisites\": [],\n \"related\": [\n \"00-overview\",\n \"02-getting-started\"\n ],\n \"packIds\": [\n \"use-case/orient-mdreports\"\n ]\n },\n {\n \"id\": \"pick-a-surface\",\n \"type\": \"use-case\",\n \"title\": \"Pick a surface and first render\",\n \"summary\": \"Choose CLI, SDK, API, or MCP and produce a first PDF/DOCX/PPTX.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"tags\": [\n \"getting-started\",\n \"quickstart\"\n ],\n \"goals\": [\n \"Choose CLI, SDK, API, or MCP and produce a first PDF/DOCX/PPTX.\"\n ],\n \"path\": \"use-cases/pick-a-surface.md\",\n \"webPath\": \"/use-cases#pick-a-surface\",\n \"prerequisites\": [],\n \"related\": [\n \"01-packages\",\n \"02-getting-started\"\n ],\n \"packIds\": [\n \"use-case/pick-a-surface\"\n ]\n },\n {\n \"id\": \"map-packages\",\n \"type\": \"use-case\",\n \"title\": \"Map the @x12i/mdreports-* packages\",\n \"summary\": \"Know which npm package owns core, CLI, API, client, MCP, types, and templates.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\"\n ],\n \"tags\": [\n \"packages\",\n \"npm\"\n ],\n \"goals\": [\n \"Know which npm package owns core, CLI, API, client, MCP, types, and templates.\"\n ],\n \"path\": \"use-cases/map-packages.md\",\n \"webPath\": \"/use-cases#map-packages\",\n \"prerequisites\": [],\n \"related\": [\n \"01-packages\"\n ],\n \"packIds\": [\n \"use-case/map-packages\"\n ]\n },\n {\n \"id\": \"render-with-sdk\",\n \"type\": \"use-case\",\n \"title\": \"Render in-process with the SDK\",\n \"summary\": \"Call renderToHtml/Pdf/Docx/Pptx, shut down Chromium, and use TemplateStore.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\"\n ],\n \"tags\": [\n \"sdk\",\n \"core\"\n ],\n \"goals\": [\n \"Call renderToHtml/Pdf/Docx/Pptx, shut down Chromium, and use TemplateStore.\"\n ],\n \"path\": \"use-cases/render-with-sdk.md\",\n \"webPath\": \"/use-cases#render-with-sdk\",\n \"prerequisites\": [],\n \"related\": [\n \"03-sdk\",\n \"07-templates\"\n ],\n \"packIds\": [\n \"use-case/render-with-sdk\"\n ]\n },\n {\n \"id\": \"render-with-cli\",\n \"type\": \"use-case\",\n \"title\": \"Render from the CLI\",\n \"summary\": \"Use mdreports render and templates commands from the shell.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\"\n ],\n \"tags\": [\n \"cli\"\n ],\n \"goals\": [\n \"Use mdreports render and templates commands from the shell.\"\n ],\n \"path\": \"use-cases/render-with-cli.md\",\n \"webPath\": \"/use-cases#render-with-cli\",\n \"prerequisites\": [],\n \"related\": [\n \"04-cli\"\n ],\n \"packIds\": [\n \"use-case/render-with-cli\"\n ]\n },\n {\n \"id\": \"call-http-api\",\n \"type\": \"use-case\",\n \"title\": \"Run and call the HTTP API\",\n \"summary\": \"Start mdreports-api and render via curl or the typed client.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\"\n ],\n \"tags\": [\n \"api\",\n \"http\"\n ],\n \"goals\": [\n \"Start mdreports-api and render via curl or the typed client.\"\n ],\n \"path\": \"use-cases/call-http-api.md\",\n \"webPath\": \"/use-cases#call-http-api\",\n \"prerequisites\": [],\n \"related\": [\n \"05-api\"\n ],\n \"packIds\": [\n \"use-case/call-http-api\"\n ]\n },\n {\n \"id\": \"wire-mcp-agents\",\n \"type\": \"use-case\",\n \"title\": \"Wire MCP tools for agents\",\n \"summary\": \"Install the MCP server and expose render/template tools to Cursor or Claude.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\"\n ],\n \"tags\": [\n \"mcp\",\n \"agents\"\n ],\n \"goals\": [\n \"Install the MCP server and expose render/template tools to Cursor or Claude.\"\n ],\n \"path\": \"use-cases/wire-mcp-agents.md\",\n \"webPath\": \"/use-cases#wire-mcp-agents\",\n \"prerequisites\": [],\n \"related\": [\n \"06-mcp\"\n ],\n \"packIds\": [\n \"use-case/wire-mcp-agents\"\n ]\n },\n {\n \"id\": \"author-templates\",\n \"type\": \"use-case\",\n \"title\": \"Author and store templates\",\n \"summary\": \"Understand the template directory contract, built-ins, user store, and PPTX rules.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"tags\": [\n \"templates\",\n \"studio\"\n ],\n \"goals\": [\n \"Understand the template directory contract, built-ins, user store, and PPTX rules.\"\n ],\n \"path\": \"use-cases/author-templates.md\",\n \"webPath\": \"/use-cases#author-templates\",\n \"prerequisites\": [],\n \"related\": [\n \"07-templates\"\n ],\n \"packIds\": [\n \"use-case/author-templates\"\n ]\n },\n {\n \"id\": \"00-overview\",\n \"type\": \"book\",\n \"title\": \"Overview\",\n \"summary\": \"Surfaces, formats, and the render pipeline — where Markdown Reports Studio fits.\",\n \"aliases\": [\n \"CASE FILE · MDR-00\"\n ],\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"tags\": [\n \"platform\",\n \"start-here\",\n \"overview\"\n ],\n \"goals\": [],\n \"path\": \"books/00-overview/\",\n \"webPath\": \"/books/00-overview\",\n \"prerequisites\": [],\n \"related\": [],\n \"packIds\": []\n },\n {\n \"id\": \"01-packages\",\n \"type\": \"book\",\n \"title\": \"Packages\",\n \"summary\": \"Which npm package to install for SDK, CLI, API, client, MCP, types, and templates.\",\n \"aliases\": [\n \"CASE FILE · MDR-01\"\n ],\n \"audiences\": [\n \"developers\"\n ],\n \"tags\": [\n \"packages\",\n \"npm\"\n ],\n \"goals\": [],\n \"path\": \"books/01-packages/\",\n \"webPath\": \"/books/01-packages\",\n \"prerequisites\": [],\n \"related\": [],\n \"packIds\": []\n },\n {\n \"id\": \"02-getting-started\",\n \"type\": \"book\",\n \"title\": \"Getting Started\",\n \"summary\": \"CLI, SDK, HTTP API, or MCP — first successful PDF/DOCX/PPTX in minutes.\",\n \"aliases\": [\n \"CASE FILE · MDR-02\"\n ],\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"tags\": [\n \"getting-started\",\n \"quickstart\"\n ],\n \"goals\": [],\n \"path\": \"books/02-getting-started/\",\n \"webPath\": \"/books/02-getting-started\",\n \"prerequisites\": [],\n \"related\": [],\n \"packIds\": []\n },\n {\n \"id\": \"03-sdk\",\n \"type\": \"book\",\n \"title\": \"SDK\",\n \"summary\": \"In-process HTML/PDF/DOCX/PPTX render, TemplateStore, and create-from-image.\",\n \"aliases\": [\n \"CASE FILE · MDR-03\"\n ],\n \"audiences\": [\n \"developers\"\n ],\n \"tags\": [\n \"sdk\",\n \"node\",\n \"core\"\n ],\n \"goals\": [],\n \"path\": \"books/03-sdk/\",\n \"webPath\": \"/books/03-sdk\",\n \"prerequisites\": [],\n \"related\": [],\n \"packIds\": []\n },\n {\n \"id\": \"04-cli\",\n \"type\": \"book\",\n \"title\": \"CLI\",\n \"summary\": \"Render from the shell and manage templates with create-from-html / create-from-image.\",\n \"aliases\": [\n \"CASE FILE · MDR-04\"\n ],\n \"audiences\": [\n \"developers\"\n ],\n \"tags\": [\n \"cli\",\n \"shell\"\n ],\n \"goals\": [],\n \"path\": \"books/04-cli/\",\n \"webPath\": \"/books/04-cli\",\n \"prerequisites\": [],\n \"related\": [],\n \"packIds\": []\n },\n {\n \"id\": \"05-api\",\n \"type\": \"book\",\n \"title\": \"HTTP API\",\n \"summary\": \"Run mdreports-api and call it with curl or @x12i/mdreports-api-client.\",\n \"aliases\": [\n \"CASE FILE · MDR-05\"\n ],\n \"audiences\": [\n \"developers\"\n ],\n \"tags\": [\n \"api\",\n \"http\",\n \"client\"\n ],\n \"goals\": [],\n \"path\": \"books/05-api/\",\n \"webPath\": \"/books/05-api\",\n \"prerequisites\": [],\n \"related\": [],\n \"packIds\": []\n },\n {\n \"id\": \"06-mcp\",\n \"type\": \"book\",\n \"title\": \"MCP\",\n \"summary\": \"Wire @x12i/mdreports-mcp-server into Cursor or Claude for render and template tools.\",\n \"aliases\": [\n \"CASE FILE · MDR-06\"\n ],\n \"audiences\": [\n \"developers\"\n ],\n \"tags\": [\n \"mcp\",\n \"agents\"\n ],\n \"goals\": [],\n \"path\": \"books/06-mcp/\",\n \"webPath\": \"/books/06-mcp\",\n \"prerequisites\": [],\n \"related\": [],\n \"packIds\": []\n },\n {\n \"id\": \"07-templates\",\n \"type\": \"book\",\n \"title\": \"Templates\",\n \"summary\": \"Template directory contract, built-ins, user store, and PPTX slide rules.\",\n \"aliases\": [\n \"CASE FILE · MDR-07\"\n ],\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"tags\": [\n \"templates\",\n \"html\",\n \"css\"\n ],\n \"goals\": [],\n \"path\": \"books/07-templates/\",\n \"webPath\": \"/books/07-templates\",\n \"prerequisites\": [],\n \"related\": [],\n \"packIds\": []\n }\n ]\n}",
863
+ "agent/use-cases/author-templates.md": "# Author and store templates\n\n> **Use case id:** `author-templates`\n> **Goal:** Understand the template directory contract, built-ins, user store, and PPTX rules.\n> **Audiences:** developers, builders\n> **Tags:** templates, studio\n\n## Reading path\n\n1. **Templates** (builders) → chapters: `1-built-ins`, `2-layout-contract`, `3-user-templates`, `4-images-in-markdown`, `5-pptx`\n\n## From: Templates — 1. Built-ins\n\nStart here before inventing a new layout:\n\n| Id | Best for |\n| --- | --- |\n| `clean-report` | Multi-section reports |\n| `letter` | Short correspondence |\n| `technical-doc` | Technical documentation |\n\n---\n\n## From: Templates — 2. Layout contract\n\nA template folder is three files:\n\n| File | Role |\n| --- | --- |\n| `template.json` | Id, name, page/theme/DOCX/PPTX styles, meta slots |\n| `layout.html` | Shell with `</head>` and `<!--CONTENT-->` |\n| `styles.css` | Look-and-feel injected into the shell |\n\nKeep slot names stable; renderers fill them from Markdown and frontmatter.\n\n---\n\n## From: Templates — 3. User templates\n\nYour custom templates live under `~/.mdreports/templates` (or a path your team sets). Built-ins are never overwritten.\n\nCreate from:\n\n- Studio UI (HTML or design screenshot)\n- CLI `create-from-html` / `create-from-image`\n- Asking an agent via MCP when configured\n\nScreenshot drafts need an Anthropic API key.\n\n---\n\n## From: Templates — 4. Images in Markdown\n\nPrefer absolute HTTPS image URLs in source Markdown so HTML and PDF previews stay reliable.\n\n---\n\n## From: Templates — 5. PPTX\n\nSlides are landscape 16:9. Structure decks with `#` headings — one H1 per slide. Put deck title in YAML frontmatter `title` for an opening title slide.\n\n## Also see\n\n- **Templates** (`07-templates`) — Template directory contract, built-ins, user store, and PPTX slide rules.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
864
+ "agent/use-cases/call-http-api.md": "# Run and call the HTTP API\n\n> **Use case id:** `call-http-api`\n> **Goal:** Start mdreports-api and render via curl or the typed client.\n> **Audiences:** developers\n> **Tags:** api, http\n\n## Reading path\n\n1. **HTTP API** (developers) → chapters: `1-run`, `2-call-with-curl`, `3-typed-client`, `4-route-summary`\n\n## From: HTTP API — 1. Run\n\n```bash\nnpm install -g @x12i/mdreports-api\nnpx playwright install chromium\nmdreports-api\n```\n\nOptional env:\n\n| Variable | Purpose |\n| --- | --- |\n| `MDREPORTS_API_PORT` / `PORT` | Listen port (default **6460**) |\n| `MDREPORTS_API_KEY` | If set, require `Authorization: Bearer <key>` (except `/health`) |\n| `MDREPORTS_TEMPLATES_DIR` | User templates directory |\n\n---\n\n## From: HTTP API — 2. Call with curl\n\n```bash\ncurl -s http://localhost:6460/health\n\ncurl -s http://localhost:6460/templates | jq .\n\ncurl -s -X POST http://localhost:6460/render/html \\\n -H 'content-type: application/json' \\\n -d '{\"markdown\":\"# Hello\",\"templateId\":\"clean-report\"}' | jq .\n\ncurl -s -X POST http://localhost:6460/render/pdf \\\n -H 'content-type: application/json' \\\n -d '{\"markdown\":\"# Hello\",\"templateId\":\"clean-report\"}' \\\n --output report.pdf\n\ncurl -s -X POST http://localhost:6460/render/pptx \\\n -H 'content-type: application/json' \\\n -d '{\"markdown\":\"# Hello\\n\\nSlide body\",\"templateId\":\"clean-report\"}' \\\n --output report.pptx\n```\n\n---\n\n## From: HTTP API — 3. Typed client\n\n```bash\nnpm install @x12i/mdreports-api-client\n```\n\n```ts\nimport { ApiClient } from \"@x12i/mdreports-api-client\";\n\nconst client = new ApiClient({\n baseUrl: \"http://localhost:6460\",\n apiKey: process.env.MDREPORTS_API_KEY\n});\n\nconst pdf = await client.renderPdf(\"# Hello\", \"clean-report\");\nconst templates = await client.listTemplates();\n```\n\n---\n\n## From: HTTP API — 4. Route summary\n\n| Method | Path | Description |\n| --- | --- |\n| `GET` | `/health` | Liveness (no auth) |\n| `GET` | `/templates` | List templates |\n| `GET` | `/templates/:id` | Get template |\n| `POST` | `/templates/from-html` | Create from HTML + CSS |\n| `POST` | `/templates/from-image` | Create from image (multipart) |\n| `PATCH` | `/templates/:id` | Update user template |\n| `DELETE` | `/templates/:id` | Delete user template |\n| `POST` | `/render/html` | Markdown → HTML JSON |\n| `POST` | `/render/pdf` | Markdown → PDF bytes |\n| `POST` | `/render/docx` | Markdown → DOCX bytes |\n| `POST` | `/render/pptx` | Markdown → PPTX bytes |\n\n## Also see\n\n- **HTTP API** (`05-api`) — Run mdreports-api and call it with curl or @x12i/mdreports-api-client.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
865
+ "agent/use-cases/map-packages.md": "# Map the @x12i/mdreports-* packages\n\n> **Use case id:** `map-packages`\n> **Goal:** Know which npm package owns core, CLI, API, client, MCP, types, and templates.\n> **Audiences:** developers\n> **Tags:** packages, npm\n\n## Reading path\n\n1. **Packages** (developers) → chapters: `1-package-table`, `2-dependency-shape`, `3-naming-note`\n\n## From: Packages — 1. Package table\n\n| Package | When to install |\n| --- | --- |\n| `@x12i/mdreports-core` | In-process HTML/PDF/DOCX/PPTX + `TemplateStore` |\n| `@x12i/mdreports-cli` | Shell command `mdreports` |\n| `@x12i/mdreports-api` | Network service `mdreports-api` |\n| `@x12i/mdreports-api-client` | Typed `fetch` client for the HTTP API |\n| `@x12i/mdreports-mcp-server` | MCP tools over stdio |\n| `@x12i/mdreports-types` | Shared Zod schemas / TS types |\n| `@x12i/mdreports-templates` | Rarely — pulled in by core |\n\nNot published: `apps/playground`, `apps/studio` (run from this monorepo).\n\nKnowledge for agents/humans: `@x12i/mdreports-docs` (this library) — install as a **devDependency** only.\n\n---\n\n## From: Packages — 2. Dependency shape\n\n```\n@x12i/mdreports-types\n ↑\n@x12i/mdreports-templates ──→ @x12i/mdreports-core ──→ CLI / API / MCP\n ↓\n @x12i/mdreports-api-client (HTTP → API)\n```\n\nCore formats: **HTML**, **PDF**, **DOCX**, and landscape **PPTX** (H1 = new slide).\n\n---\n\n## From: Packages — 3. Naming note\n\nShort names like `@x12i/core` / `@x12i/cli` are already used by another x12i project on npm, so this product publishes under `@x12i/mdreports-*`.\n\n## Also see\n\n- **Packages** (`01-packages`) — Which npm package to install for SDK, CLI, API, client, MCP, types, and templates.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
866
+ "agent/use-cases/orient-mdreports.md": "# Orient on Markdown Reports Studio\n\n> **Use case id:** `orient-mdreports`\n> **Goal:** Understand formats, surfaces, and the one render pipeline before installing anything.\n> **Audiences:** developers, builders\n> **Tags:** platform, start-here\n\n## Reading path\n\n1. **Overview** (developers) → chapters: `1-what-it-is`, `2-formats-and-surfaces`, `3-how-rendering-works`, `4-where-to-go-next`\n\n## From: Overview — 1. What it is\n\nTurn Markdown into styled **PDF**, **Word (DOCX)**, **PowerPoint (PPTX)**, and **HTML** using swappable templates.\n\n**Not** a CMS or collaborative editor — a render pipeline: Markdown in, branded document out.\n\nOne engine powers every surface: SDK, CLI, HTTP API, MCP server, Playground UI, and Studio UI.\n\n---\n\n## From: Overview — 2. Formats and surfaces\n\n| Capability | Details |\n| --- | --- |\n| Formats | HTML, PDF (Playwright Chromium), DOCX, PPTX (landscape 16:9) |\n| Templates | Built-ins (`clean-report`, `letter`, `technical-doc`) + your own |\n| Frontmatter | YAML (e.g. `title`) fills template slots |\n| Surfaces | SDK, CLI (`mdreports`), HTTP API, MCP, Playground (`:6461`), Studio (`:6463`) |\n\nAll published packages are public under `@x12i/mdreports-*` on npm.\n\nPDF needs Chromium once per machine: `npx playwright install chromium`. Requires **Node.js 20.11+**.\n\n---\n\n## From: Overview — 3. How rendering works\n\n1. **Parse** Markdown (including YAML frontmatter).\n2. **Load template** by id — built-in or user template from disk.\n3. **Inject** CSS into `layout.html` and fill slots (`<!--CONTENT-->`, `<!--TITLE-->`, meta slots).\n4. **Emit** HTML string, PDF via pooled Chromium, DOCX/PPTX from the Markdown AST.\n\nAlways call `shutdown()` in SDK/long-lived processes so the browser exits cleanly.\n\n### Known limitations\n\n- **HTML/PDF images**: absolute `http(s)` URLs or data URIs only.\n- **DOCX / PPTX images**: local paths and URLs are best-effort; failures become `[image: alt]`.\n- **DOCX / PPTX code blocks**: monospace + shading — no syntax highlighting.\n- **PPTX overflow**: long content under a single H1 is not auto-split (may clip).\n- **Raw HTML in Markdown**: kept for HTML/PDF; dropped for DOCX and PPTX.\n\n---\n\n## From: Overview — 4. Where to go next\n\n| Goal | Book / use case |\n| --- | --- |\n| First successful file | Getting Started · `pick-a-surface` |\n| Which package to install | Packages · `map-packages` |\n| Custom look | Templates · `author-templates` |\n| Agent tools | MCP · `wire-mcp-agents` |\n\n## Also see\n\n- **Overview** (`00-overview`) — Surfaces, formats, and the render pipeline — where Markdown Reports Studio fits.\n- **Getting Started** (`02-getting-started`) — CLI, SDK, HTTP API, or MCP — first successful PDF/DOCX/PPTX in minutes.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
867
+ "agent/use-cases/pick-a-surface.md": "# Pick a surface and first render\n\n> **Use case id:** `pick-a-surface`\n> **Goal:** Choose CLI, SDK, API, or MCP and produce a first PDF/DOCX/PPTX.\n> **Audiences:** developers, builders\n> **Tags:** getting-started, quickstart\n\n## Reading path\n\n1. **Getting Started** (developers) → chapters: `1-prerequisites`, `2-option-a-cli`, `3-option-b-sdk`, `4-option-c-http-api`, `5-option-d-mcp`, `6-built-in-templates`\n\n## From: Getting Started — 1. Prerequisites\n\n- Node.js **20.11+**\n- Chromium for PDF: `npx playwright install chromium`\n\n---\n\n## From: Getting Started — 2. Option A — CLI\n\n```bash\nnpm install -g @x12i/mdreports-cli\nnpx playwright install chromium\n\nmdreports templates list\nmdreports render --in report.md --template clean-report --format pdf --out report.pdf\nmdreports render --in report.md --template clean-report --format pptx --out report.pptx\n```\n\n---\n\n## From: Getting Started — 3. Option B — SDK\n\n```bash\nnpm install @x12i/mdreports-core\nnpx playwright install chromium\n```\n\n```ts\nimport { renderToPdf, renderToPptx, shutdown } from \"@x12i/mdreports-core\";\nimport { writeFile } from \"node:fs/promises\";\n\nconst pdf = await renderToPdf(\"# Hello\\n\\nWorld\", \"clean-report\");\nawait writeFile(\"report.pdf\", pdf);\n\nconst pptx = await renderToPptx(\"# Hello\\n\\nWorld\", \"clean-report\");\nawait writeFile(\"report.pptx\", pptx);\nawait shutdown();\n```\n\n---\n\n## From: Getting Started — 4. Option C — HTTP API\n\n```bash\nnpm install -g @x12i/mdreports-api\nnpx playwright install chromium\nmdreports-api # http://localhost:6460\n```\n\n```ts\nimport { ApiClient } from \"@x12i/mdreports-api-client\";\n\nconst client = new ApiClient({ baseUrl: \"http://localhost:6460\" });\nconst pdf = await client.renderPdf(\"# Hello\", \"clean-report\");\n```\n\n---\n\n## From: Getting Started — 5. Option D — MCP\n\n```json\n{\n \"mcpServers\": {\n \"mdreports\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@x12i/mdreports-mcp-server\"]\n }\n }\n}\n```\n\n---\n\n## From: Getting Started — 6. Built-in templates\n\n- `clean-report` — multi-section reports\n- `letter` — short correspondence\n- `technical-doc` — technical documentation\n\nCreate your own with CLI `templates create-from-html` / `create-from-image`, the SDK, or Studio.\n\n## Also see\n\n- **Packages** (`01-packages`) — Which npm package to install for SDK, CLI, API, client, MCP, types, and templates.\n- **Getting Started** (`02-getting-started`) — CLI, SDK, HTTP API, or MCP — first successful PDF/DOCX/PPTX in minutes.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
868
+ "agent/use-cases/render-with-cli.md": "# Render from the CLI\n\n> **Use case id:** `render-with-cli`\n> **Goal:** Use mdreports render and templates commands from the shell.\n> **Audiences:** developers\n> **Tags:** cli\n\n## Reading path\n\n1. **CLI** (developers) → chapters: `1-install`, `2-render`, `3-templates`\n\n## From: CLI — 1. Install\n\n```bash\nnpm install -g @x12i/mdreports-cli\nnpx playwright install chromium\n```\n\nBinary name: `mdreports`.\n\n---\n\n## From: CLI — 2. Render\n\n```bash\nmdreports render --in report.md --template clean-report --format pdf --out report.pdf\nmdreports render --in report.md --template letter --format docx\nmdreports render --in report.md --template clean-report --format pptx\nmdreports render --in report.md --template technical-doc --format html\n```\n\n---\n\n## From: CLI — 3. Templates\n\n```bash\nmdreports templates list\nmdreports templates list --json\nmdreports templates show clean-report\nmdreports templates create-from-html --id my-layout --name \"My Layout\" \\\n --layout layout.html --styles styles.css\nmdreports templates create-from-image --id from-shot --name \"From Shot\" \\\n --image design.png\nmdreports templates delete my-layout\n```\n\n`--templates-dir` overrides the user templates directory on any command.\n\n## Also see\n\n- **CLI** (`04-cli`) — Render from the shell and manage templates with create-from-html / create-from-image.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
869
+ "agent/use-cases/render-with-sdk.md": "# Render in-process with the SDK\n\n> **Use case id:** `render-with-sdk`\n> **Goal:** Call renderToHtml/Pdf/Docx/Pptx, shut down Chromium, and use TemplateStore.\n> **Audiences:** developers\n> **Tags:** sdk, core\n\n## Reading path\n\n1. **SDK** (developers) → chapters: `1-install`, `2-render`, `3-template-store`, `4-ai-template-from-image`\n\n## From: SDK — 1. Install\n\n```bash\nnpm install @x12i/mdreports-core\nnpx playwright install chromium\n```\n\n---\n\n## From: SDK — 2. Render\n\n```ts\nimport { renderToHtml, renderToPdf, renderToDocx, renderToPptx, shutdown } from \"@x12i/mdreports-core\";\n\nconst md = `---\ntitle: Q1 Report\n---\n\n# Summary\n\nBody here.\n`;\n\nconst { html, title } = await renderToHtml(md, \"clean-report\");\nconst pdf = await renderToPdf(md, \"clean-report\", {\n pdf: { format: \"Letter\", landscape: false }\n});\nconst docx = await renderToDocx(md, \"technical-doc\");\nconst pptx = await renderToPptx(md, \"clean-report\"); // landscape 16:9; each H1 = new slide\n\nawait shutdown();\n```\n\nAlways call `shutdown()` when your process is done (or on SIGTERM in long-lived servers) so Playwright exits cleanly.\n\n---\n\n## From: SDK — 3. Template store\n\n```ts\nimport { TemplateStore } from \"@x12i/mdreports-core\";\n\nconst store = new TemplateStore({\n templatesDir: \"./my-templates\" // optional; else MDREPORTS_TEMPLATES_DIR or ~/.mdreports/templates\n});\n\nconst all = await store.list();\nconst one = await store.get(\"clean-report\");\n\nawait store.createFromHtml({\n id: \"brand-report\",\n name: \"Brand Report\",\n layoutHtml: \"<!doctype html><html><head></head><body><main><!--CONTENT--></main></body></html>\",\n stylesCss: \"main { max-width: 720px; margin: 0 auto; }\"\n});\n\nawait store.update(\"brand-report\", { name: \"Brand Report v2\" });\nawait store.delete(\"brand-report\");\n```\n\nBuilt-in templates cannot be updated or deleted.\n\n---\n\n## From: SDK — 4. AI template from image\n\n```ts\nimport { readFile } from \"node:fs/promises\";\nimport { createTemplateFromImage, shutdown } from \"@x12i/mdreports-core\";\n\nconst imageBuffer = await readFile(\"design.png\");\nawait createTemplateFromImage({\n id: \"from-design\",\n name: \"From Design\",\n imageBuffer,\n imageMediaType: \"image/png\",\n anthropicApiKey: process.env.ANTHROPIC_API_KEY!\n});\nawait shutdown();\n```\n\n## Also see\n\n- **SDK** (`03-sdk`) — In-process HTML/PDF/DOCX/PPTX render, TemplateStore, and create-from-image.\n- **Templates** (`07-templates`) — Template directory contract, built-ins, user store, and PPTX slide rules.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
870
+ "agent/use-cases/wire-mcp-agents.md": "# Wire MCP tools for agents\n\n> **Use case id:** `wire-mcp-agents`\n> **Goal:** Install the MCP server and expose render/template tools to Cursor or Claude.\n> **Audiences:** developers\n> **Tags:** mcp, agents\n\n## Reading path\n\n1. **MCP** (developers) → chapters: `1-run-configure`, `2-tools`\n\n## From: MCP — 1. Run configure\n\n```bash\nnpm install -g @x12i/mdreports-mcp-server\nnpx playwright install chromium\n```\n\nExample MCP client config:\n\n```json\n{\n \"mcpServers\": {\n \"mdreports\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@x12i/mdreports-mcp-server\"],\n \"env\": {\n \"ANTHROPIC_API_KEY\": \"optional\"\n }\n }\n }\n}\n```\n\nOptional: `MDREPORTS_TEMPLATES_DIR` for the user template store.\n\n---\n\n## From: MCP — 2. Tools\n\n- `list_templates` / `get_template`\n- `render_markdown_to_html` (returns HTML inline)\n- `render_markdown_to_pdf` / `render_markdown_to_docx` / `render_markdown_to_pptx` (write a file; optional `outPath`)\n- `create_template_from_html` / `create_template_from_image` / `delete_template`\n\nPPTX is always landscape 16:9; each `#` heading starts a new slide.\n\n## Also see\n\n- **MCP** (`06-mcp`) — Wire @x12i/mdreports-mcp-server into Cursor or Claude for render and template tools.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
871
+ "agent-manifest.json": "{\n \"version\": 1,\n \"product\": \"mdreports\",\n \"site\": \"https://docs.mdreports.x12i.com\",\n \"knowledgePackage\": \"@x12i/mdreports-docs\",\n \"roles\": [\n \"developers\",\n \"builders\"\n ],\n \"books\": [\n {\n \"id\": \"00-overview\",\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/00-overview/developers.md\",\n \"builders\": \"downloads/books/00-overview/builders.md\"\n },\n \"pdf\": {\n \"developers\": null,\n \"builders\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/00-overview/developers.chapters.json\",\n \"builders\": \"downloads/books/00-overview/builders.chapters.json\"\n }\n },\n {\n \"id\": \"01-packages\",\n \"audiences\": [\n \"developers\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/01-packages/developers.md\"\n },\n \"pdf\": {\n \"developers\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/01-packages/developers.chapters.json\"\n }\n },\n {\n \"id\": \"02-getting-started\",\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/02-getting-started/developers.md\",\n \"builders\": \"downloads/books/02-getting-started/builders.md\"\n },\n \"pdf\": {\n \"developers\": null,\n \"builders\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/02-getting-started/developers.chapters.json\",\n \"builders\": \"downloads/books/02-getting-started/builders.chapters.json\"\n }\n },\n {\n \"id\": \"03-sdk\",\n \"audiences\": [\n \"developers\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/03-sdk/developers.md\"\n },\n \"pdf\": {\n \"developers\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/03-sdk/developers.chapters.json\"\n }\n },\n {\n \"id\": \"04-cli\",\n \"audiences\": [\n \"developers\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/04-cli/developers.md\"\n },\n \"pdf\": {\n \"developers\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/04-cli/developers.chapters.json\"\n }\n },\n {\n \"id\": \"05-api\",\n \"audiences\": [\n \"developers\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/05-api/developers.md\"\n },\n \"pdf\": {\n \"developers\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/05-api/developers.chapters.json\"\n }\n },\n {\n \"id\": \"06-mcp\",\n \"audiences\": [\n \"developers\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/06-mcp/developers.md\"\n },\n \"pdf\": {\n \"developers\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/06-mcp/developers.chapters.json\"\n }\n },\n {\n \"id\": \"07-templates\",\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"md\": {\n \"developers\": \"downloads/books/07-templates/developers.md\",\n \"builders\": \"downloads/books/07-templates/builders.md\"\n },\n \"pdf\": {\n \"developers\": null,\n \"builders\": null\n },\n \"chapters\": {\n \"developers\": \"downloads/books/07-templates/developers.chapters.json\",\n \"builders\": \"downloads/books/07-templates/builders.chapters.json\"\n }\n }\n ],\n \"useCases\": [\n {\n \"id\": \"orient-mdreports\",\n \"title\": \"Orient on Markdown Reports Studio\",\n \"md\": \"downloads/use-cases/orient-mdreports.md\",\n \"path\": [\n {\n \"bookId\": \"00-overview\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"1-what-it-is\",\n \"2-formats-and-surfaces\",\n \"3-how-rendering-works\",\n \"4-where-to-go-next\"\n ]\n }\n ]\n },\n {\n \"id\": \"pick-a-surface\",\n \"title\": \"Pick a surface and first render\",\n \"md\": \"downloads/use-cases/pick-a-surface.md\",\n \"path\": [\n {\n \"bookId\": \"02-getting-started\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"1-prerequisites\",\n \"2-option-a-cli\",\n \"3-option-b-sdk\",\n \"4-option-c-http-api\",\n \"5-option-d-mcp\",\n \"6-built-in-templates\"\n ]\n }\n ]\n },\n {\n \"id\": \"map-packages\",\n \"title\": \"Map the @x12i/mdreports-* packages\",\n \"md\": \"downloads/use-cases/map-packages.md\",\n \"path\": [\n {\n \"bookId\": \"01-packages\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"1-package-table\",\n \"2-dependency-shape\",\n \"3-naming-note\"\n ]\n }\n ]\n },\n {\n \"id\": \"render-with-sdk\",\n \"title\": \"Render in-process with the SDK\",\n \"md\": \"downloads/use-cases/render-with-sdk.md\",\n \"path\": [\n {\n \"bookId\": \"03-sdk\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"1-install\",\n \"2-render\",\n \"3-template-store\",\n \"4-ai-template-from-image\"\n ]\n }\n ]\n },\n {\n \"id\": \"render-with-cli\",\n \"title\": \"Render from the CLI\",\n \"md\": \"downloads/use-cases/render-with-cli.md\",\n \"path\": [\n {\n \"bookId\": \"04-cli\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"1-install\",\n \"2-render\",\n \"3-templates\"\n ]\n }\n ]\n },\n {\n \"id\": \"call-http-api\",\n \"title\": \"Run and call the HTTP API\",\n \"md\": \"downloads/use-cases/call-http-api.md\",\n \"path\": [\n {\n \"bookId\": \"05-api\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"1-run\",\n \"2-call-with-curl\",\n \"3-typed-client\",\n \"4-route-summary\"\n ]\n }\n ]\n },\n {\n \"id\": \"wire-mcp-agents\",\n \"title\": \"Wire MCP tools for agents\",\n \"md\": \"downloads/use-cases/wire-mcp-agents.md\",\n \"path\": [\n {\n \"bookId\": \"06-mcp\",\n \"audience\": \"developers\",\n \"chapters\": [\n \"1-run-configure\",\n \"2-tools\"\n ]\n }\n ]\n },\n {\n \"id\": \"author-templates\",\n \"title\": \"Author and store templates\",\n \"md\": \"downloads/use-cases/author-templates.md\",\n \"path\": [\n {\n \"bookId\": \"07-templates\",\n \"audience\": \"builders\",\n \"chapters\": [\n \"1-built-ins\",\n \"2-layout-contract\",\n \"3-user-templates\",\n \"4-images-in-markdown\",\n \"5-pptx\"\n ]\n }\n ]\n }\n ],\n \"indexes\": {\n \"indexMd\": \"INDEX.md\",\n \"searchJson\": \"SEARCH.json\"\n },\n \"concepts\": [\n {\n \"id\": \"render-pipeline\",\n \"title\": \"Render pipeline\",\n \"md\": \"concepts/render-pipeline.md\"\n }\n ],\n \"guides\": [\n {\n \"id\": \"pick-a-surface\",\n \"title\": \"Pick a surface\",\n \"md\": \"guides/pick-a-surface.md\"\n }\n ],\n \"scenarios\": [\n {\n \"id\": \"choose-integrate-or-ui\",\n \"title\": \"Choose integrate-or-UI path\",\n \"md\": \"scenarios/choose-integrate-or-ui.md\"\n }\n ],\n \"decisions\": [],\n \"glossary\": [],\n \"visuals\": [],\n \"diagrams\": [],\n \"relationships\": [],\n \"tutorials\": [],\n \"examples\": [],\n \"sampleData\": [],\n \"uiClients\": [],\n \"apis\": [],\n \"packs\": [\n {\n \"id\": \"concept/render-pipeline\",\n \"type\": \"concept\",\n \"path\": \"packs/concept/render-pipeline\"\n },\n {\n \"id\": \"guide/pick-a-surface\",\n \"type\": \"guide\",\n \"path\": \"packs/guide/pick-a-surface\"\n },\n {\n \"id\": \"scenario/choose-integrate-or-ui\",\n \"type\": \"scenario\",\n \"path\": \"packs/scenario/choose-integrate-or-ui\"\n }\n ]\n}",
872
+ "concepts/render-pipeline.md": "---\nid: \"render-pipeline\"\ntype: \"concept\"\ntitle: \"Render pipeline\"\nsummary: \"Markdown plus a template id becomes HTML, PDF, DOCX, or PPTX through one shared engine.\"\nproblem: \"Teams reimplement Markdown rendering per surface and drift on templates, slots, and export fidelity.\"\nwhy: \"One core (`@x12i/mdreports-core`) keeps CLI, API, MCP, Playground, and Studio on the same contract.\"\nmentalModel: \"Parse Markdown → load template → inject CSS/slots → emit the requested format.\"\naudiences: [\"developers\", \"builders\"]\nnext: [\"pick-a-surface\"]\n---\n# Render pipeline\n\n# Render pipeline\n\n## Answer\n\nMarkdown Reports Studio is a **render pipeline**: Markdown in, branded document out — not a CMS.\n\n## Problem\n\nWithout a shared engine, PDF/DOCX/HTML exports diverge per tool and templates stop composing.\n\n## Why\n\nSDK, CLI, HTTP API, MCP, Playground, and Studio all call the same core so template ids and frontmatter behave identically.\n\n## Mental model\n\n1. Parse Markdown (YAML frontmatter fills slots).\n2. Load a template (`layout.html` + `styles.css` + `template.json`).\n3. Inject CSS and fill slots (`<!--CONTENT-->`, `<!--TITLE-->`, meta slots).\n4. Emit HTML, PDF (Playwright), DOCX, or PPTX.\n\n## Example\n\n```ts\nimport { renderToPdf, shutdown } from \"@x12i/mdreports-core\";\n\nconst pdf = await renderToPdf(\"# Hello\", \"clean-report\");\nawait shutdown();\n```\n\n## How it works\n\nBuilt-in templates ship in `@x12i/mdreports-templates`. User templates live under `~/.mdreports/templates` (or `MDREPORTS_TEMPLATES_DIR`).\n\n## Next\n\nPick a surface — CLI for shells, SDK for Node, API for services, MCP for agents.",
873
+ "downloads/books/00-overview/builders.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"1-what-it-is\",\n \"title\": \"1. What it is\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"2-formats-and-surfaces\",\n \"title\": \"2. Formats and surfaces\",\n \"level\": 2,\n \"order\": 2\n },\n {\n \"slug\": \"3-how-rendering-works\",\n \"title\": \"3. How rendering works\",\n \"level\": 2,\n \"order\": 3\n },\n {\n \"slug\": \"4-where-to-go-next\",\n \"title\": \"4. Where to go next\",\n \"level\": 2,\n \"order\": 4\n }\n]",
874
+ "downloads/books/00-overview/builders.md": "# Overview — Builders\n\n**Audience:** Template authors and Studio users. \n**Twin:** [Developers version](../developers/BOOK.md)\n\n---\n\n## 1. What it is\n\nMarkdown Reports Studio turns Markdown into branded **PDF**, **DOCX**, **PPTX**, and **HTML** using templates you can browse and edit in Studio.\n\nYou do not need to change the renderer to ship a new look — author HTML+CSS templates (or draft from a screenshot) and pick them at render time.\n\n---\n\n## 2. Formats and surfaces\n\n| You want… | Use |\n| --- | --- |\n| Try Markdown → preview / download | Playground (repo, port **6461**) |\n| Browse / create / edit templates | Studio (repo, port **6463**) |\n| Built-in looks without custom work | `clean-report`, `letter`, `technical-doc` |\n\nDevelopers wire SDK/CLI/API/MCP; builders own template content and design screenshots for `create-from-image`.\n\n---\n\n## 3. How rendering works\n\nMarkdown (+ optional frontmatter `title`) is poured into a template shell. HTML/PDF share the same layout; DOCX and PPTX map structure from headings and paragraphs.\n\nPPTX: each `#` (H1) starts a new landscape 16:9 slide.\n\n---\n\n## 4. Where to go next\n\n- **Getting Started** — see the product end-to-end once.\n- **Templates** — layout contract, slots, user store (`author-templates`).\n",
875
+ "downloads/books/00-overview/developers.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"1-what-it-is\",\n \"title\": \"1. What it is\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"2-formats-and-surfaces\",\n \"title\": \"2. Formats and surfaces\",\n \"level\": 2,\n \"order\": 2\n },\n {\n \"slug\": \"3-how-rendering-works\",\n \"title\": \"3. How rendering works\",\n \"level\": 2,\n \"order\": 3\n },\n {\n \"slug\": \"4-where-to-go-next\",\n \"title\": \"4. Where to go next\",\n \"level\": 2,\n \"order\": 4\n }\n]",
876
+ "downloads/books/00-overview/developers.md": "# Overview — Developers\n\n**Audience:** Engineers choosing how to consume Markdown Reports Studio. \n**Twin:** [Builders version](../builders/BOOK.md)\n\n---\n\n## 1. What it is\n\nTurn Markdown into styled **PDF**, **Word (DOCX)**, **PowerPoint (PPTX)**, and **HTML** using swappable templates.\n\n**Not** a CMS or collaborative editor — a render pipeline: Markdown in, branded document out.\n\nOne engine powers every surface: SDK, CLI, HTTP API, MCP server, Playground UI, and Studio UI.\n\n---\n\n## 2. Formats and surfaces\n\n| Capability | Details |\n| --- | --- |\n| Formats | HTML, PDF (Playwright Chromium), DOCX, PPTX (landscape 16:9) |\n| Templates | Built-ins (`clean-report`, `letter`, `technical-doc`) + your own |\n| Frontmatter | YAML (e.g. `title`) fills template slots |\n| Surfaces | SDK, CLI (`mdreports`), HTTP API, MCP, Playground (`:6461`), Studio (`:6463`) |\n\nAll published packages are public under `@x12i/mdreports-*` on npm.\n\nPDF needs Chromium once per machine: `npx playwright install chromium`. Requires **Node.js 20.11+**.\n\n---\n\n## 3. How rendering works\n\n1. **Parse** Markdown (including YAML frontmatter).\n2. **Load template** by id — built-in or user template from disk.\n3. **Inject** CSS into `layout.html` and fill slots (`<!--CONTENT-->`, `<!--TITLE-->`, meta slots).\n4. **Emit** HTML string, PDF via pooled Chromium, DOCX/PPTX from the Markdown AST.\n\nAlways call `shutdown()` in SDK/long-lived processes so the browser exits cleanly.\n\n### Known limitations\n\n- **HTML/PDF images**: absolute `http(s)` URLs or data URIs only.\n- **DOCX / PPTX images**: local paths and URLs are best-effort; failures become `[image: alt]`.\n- **DOCX / PPTX code blocks**: monospace + shading — no syntax highlighting.\n- **PPTX overflow**: long content under a single H1 is not auto-split (may clip).\n- **Raw HTML in Markdown**: kept for HTML/PDF; dropped for DOCX and PPTX.\n\n---\n\n## 4. Where to go next\n\n| Goal | Book / use case |\n| --- | --- |\n| First successful file | Getting Started · `pick-a-surface` |\n| Which package to install | Packages · `map-packages` |\n| Custom look | Templates · `author-templates` |\n| Agent tools | MCP · `wire-mcp-agents` |\n",
877
+ "downloads/books/01-packages/developers.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"1-package-table\",\n \"title\": \"1. Package table\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"2-dependency-shape\",\n \"title\": \"2. Dependency shape\",\n \"level\": 2,\n \"order\": 2\n },\n {\n \"slug\": \"3-naming-note\",\n \"title\": \"3. Naming note\",\n \"level\": 2,\n \"order\": 3\n }\n]",
878
+ "downloads/books/01-packages/developers.md": "# Packages — Developers\n\n**Audience:** Engineers choosing which `@x12i/mdreports-*` package to install.\n\n---\n\n## 1. Package table\n\n| Package | When to install |\n| --- | --- |\n| `@x12i/mdreports-core` | In-process HTML/PDF/DOCX/PPTX + `TemplateStore` |\n| `@x12i/mdreports-cli` | Shell command `mdreports` |\n| `@x12i/mdreports-api` | Network service `mdreports-api` |\n| `@x12i/mdreports-api-client` | Typed `fetch` client for the HTTP API |\n| `@x12i/mdreports-mcp-server` | MCP tools over stdio |\n| `@x12i/mdreports-types` | Shared Zod schemas / TS types |\n| `@x12i/mdreports-templates` | Rarely — pulled in by core |\n\nNot published: `apps/playground`, `apps/studio` (run from this monorepo).\n\nKnowledge for agents/humans: `@x12i/mdreports-docs` (this library) — install as a **devDependency** only.\n\n---\n\n## 2. Dependency shape\n\n```\n@x12i/mdreports-types\n ↑\n@x12i/mdreports-templates ──→ @x12i/mdreports-core ──→ CLI / API / MCP\n ↓\n @x12i/mdreports-api-client (HTTP → API)\n```\n\nCore formats: **HTML**, **PDF**, **DOCX**, and landscape **PPTX** (H1 = new slide).\n\n---\n\n## 3. Naming note\n\nShort names like `@x12i/core` / `@x12i/cli` are already used by another x12i project on npm, so this product publishes under `@x12i/mdreports-*`.\n",
879
+ "downloads/books/02-getting-started/builders.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"1-prerequisites\",\n \"title\": \"1. Prerequisites\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"2-option-a-cli\",\n \"title\": \"2. Option A — CLI\",\n \"level\": 2,\n \"order\": 2\n },\n {\n \"slug\": \"3-option-b-sdk\",\n \"title\": \"3. Option B — SDK\",\n \"level\": 2,\n \"order\": 3\n },\n {\n \"slug\": \"4-option-c-http-api\",\n \"title\": \"4. Option C — HTTP API\",\n \"level\": 2,\n \"order\": 4\n },\n {\n \"slug\": \"5-option-d-mcp\",\n \"title\": \"5. Option D — MCP\",\n \"level\": 2,\n \"order\": 5\n },\n {\n \"slug\": \"6-built-in-templates\",\n \"title\": \"6. Built-in templates\",\n \"level\": 2,\n \"order\": 6\n }\n]",
880
+ "downloads/books/02-getting-started/builders.md": "# Getting Started — Builders\n\n**Audience:** People trying Playground/Studio before writing code. \n**Twin:** [Developers version](../developers/BOOK.md)\n\n---\n\n## 1. Prerequisites\n\nFrom this monorepo:\n\n```bash\npnpm install\npnpm playwright:install\npnpm build\npnpm dev\n```\n\n- Playground: **6461**\n- Studio: **6463**\n- API: **6460**\n\n---\n\n## 2. Option A — CLI\n\nAsk a developer to install `@x12i/mdreports-cli`, or use Playground export once `pnpm dev` is running.\n\n---\n\n## 3. Option B — SDK\n\nDevelopers embed `@x12i/mdreports-core`. Builders supply template HTML/CSS and sample Markdown.\n\n---\n\n## 4. Option C — HTTP API\n\nStudio and Playground talk to the local API. Optional `MDREPORTS_API_KEY` protects non-health routes.\n\n---\n\n## 5. Option D — MCP\n\nAgents can render and create templates when the MCP server is configured — useful for “turn this Markdown into a PDF” workflows.\n\n---\n\n## 6. Built-in templates\n\nStart with `clean-report`, then clone look-and-feel via Studio create-from-HTML or create-from-image (`ANTHROPIC_API_KEY` required for image drafts).\n",
881
+ "downloads/books/02-getting-started/developers.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"1-prerequisites\",\n \"title\": \"1. Prerequisites\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"2-option-a-cli\",\n \"title\": \"2. Option A — CLI\",\n \"level\": 2,\n \"order\": 2\n },\n {\n \"slug\": \"3-option-b-sdk\",\n \"title\": \"3. Option B — SDK\",\n \"level\": 2,\n \"order\": 3\n },\n {\n \"slug\": \"4-option-c-http-api\",\n \"title\": \"4. Option C — HTTP API\",\n \"level\": 2,\n \"order\": 4\n },\n {\n \"slug\": \"5-option-d-mcp\",\n \"title\": \"5. Option D — MCP\",\n \"level\": 2,\n \"order\": 5\n },\n {\n \"slug\": \"6-built-in-templates\",\n \"title\": \"6. Built-in templates\",\n \"level\": 2,\n \"order\": 6\n }\n]",
882
+ "downloads/books/02-getting-started/developers.md": "# Getting Started — Developers\n\n**Audience:** First-time integrators. \n**Twin:** [Builders version](../builders/BOOK.md)\n\n---\n\n## 1. Prerequisites\n\n- Node.js **20.11+**\n- Chromium for PDF: `npx playwright install chromium`\n\n---\n\n## 2. Option A — CLI\n\n```bash\nnpm install -g @x12i/mdreports-cli\nnpx playwright install chromium\n\nmdreports templates list\nmdreports render --in report.md --template clean-report --format pdf --out report.pdf\nmdreports render --in report.md --template clean-report --format pptx --out report.pptx\n```\n\n---\n\n## 3. Option B — SDK\n\n```bash\nnpm install @x12i/mdreports-core\nnpx playwright install chromium\n```\n\n```ts\nimport { renderToPdf, renderToPptx, shutdown } from \"@x12i/mdreports-core\";\nimport { writeFile } from \"node:fs/promises\";\n\nconst pdf = await renderToPdf(\"# Hello\\n\\nWorld\", \"clean-report\");\nawait writeFile(\"report.pdf\", pdf);\n\nconst pptx = await renderToPptx(\"# Hello\\n\\nWorld\", \"clean-report\");\nawait writeFile(\"report.pptx\", pptx);\nawait shutdown();\n```\n\n---\n\n## 4. Option C — HTTP API\n\n```bash\nnpm install -g @x12i/mdreports-api\nnpx playwright install chromium\nmdreports-api # http://localhost:6460\n```\n\n```ts\nimport { ApiClient } from \"@x12i/mdreports-api-client\";\n\nconst client = new ApiClient({ baseUrl: \"http://localhost:6460\" });\nconst pdf = await client.renderPdf(\"# Hello\", \"clean-report\");\n```\n\n---\n\n## 5. Option D — MCP\n\n```json\n{\n \"mcpServers\": {\n \"mdreports\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@x12i/mdreports-mcp-server\"]\n }\n }\n}\n```\n\n---\n\n## 6. Built-in templates\n\n- `clean-report` — multi-section reports\n- `letter` — short correspondence\n- `technical-doc` — technical documentation\n\nCreate your own with CLI `templates create-from-html` / `create-from-image`, the SDK, or Studio.\n",
883
+ "downloads/books/03-sdk/developers.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"1-install\",\n \"title\": \"1. Install\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"2-render\",\n \"title\": \"2. Render\",\n \"level\": 2,\n \"order\": 2\n },\n {\n \"slug\": \"3-template-store\",\n \"title\": \"3. Template store\",\n \"level\": 2,\n \"order\": 3\n },\n {\n \"slug\": \"4-ai-template-from-image\",\n \"title\": \"4. AI template from image\",\n \"level\": 2,\n \"order\": 4\n }\n]",
884
+ "downloads/books/03-sdk/developers.md": "# SDK — Developers\n\n**Audience:** Engineers embedding `@x12i/mdreports-core` in Node.js.\n\n---\n\n## 1. Install\n\n```bash\nnpm install @x12i/mdreports-core\nnpx playwright install chromium\n```\n\n---\n\n## 2. Render\n\n```ts\nimport { renderToHtml, renderToPdf, renderToDocx, renderToPptx, shutdown } from \"@x12i/mdreports-core\";\n\nconst md = `---\ntitle: Q1 Report\n---\n\n# Summary\n\nBody here.\n`;\n\nconst { html, title } = await renderToHtml(md, \"clean-report\");\nconst pdf = await renderToPdf(md, \"clean-report\", {\n pdf: { format: \"Letter\", landscape: false }\n});\nconst docx = await renderToDocx(md, \"technical-doc\");\nconst pptx = await renderToPptx(md, \"clean-report\"); // landscape 16:9; each H1 = new slide\n\nawait shutdown();\n```\n\nAlways call `shutdown()` when your process is done (or on SIGTERM in long-lived servers) so Playwright exits cleanly.\n\n---\n\n## 3. Template store\n\n```ts\nimport { TemplateStore } from \"@x12i/mdreports-core\";\n\nconst store = new TemplateStore({\n templatesDir: \"./my-templates\" // optional; else MDREPORTS_TEMPLATES_DIR or ~/.mdreports/templates\n});\n\nconst all = await store.list();\nconst one = await store.get(\"clean-report\");\n\nawait store.createFromHtml({\n id: \"brand-report\",\n name: \"Brand Report\",\n layoutHtml: \"<!doctype html><html><head></head><body><main><!--CONTENT--></main></body></html>\",\n stylesCss: \"main { max-width: 720px; margin: 0 auto; }\"\n});\n\nawait store.update(\"brand-report\", { name: \"Brand Report v2\" });\nawait store.delete(\"brand-report\");\n```\n\nBuilt-in templates cannot be updated or deleted.\n\n---\n\n## 4. AI template from image\n\n```ts\nimport { readFile } from \"node:fs/promises\";\nimport { createTemplateFromImage, shutdown } from \"@x12i/mdreports-core\";\n\nconst imageBuffer = await readFile(\"design.png\");\nawait createTemplateFromImage({\n id: \"from-design\",\n name: \"From Design\",\n imageBuffer,\n imageMediaType: \"image/png\",\n anthropicApiKey: process.env.ANTHROPIC_API_KEY!\n});\nawait shutdown();\n```\n",
885
+ "downloads/books/04-cli/developers.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"1-install\",\n \"title\": \"1. Install\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"2-render\",\n \"title\": \"2. Render\",\n \"level\": 2,\n \"order\": 2\n },\n {\n \"slug\": \"3-templates\",\n \"title\": \"3. Templates\",\n \"level\": 2,\n \"order\": 3\n }\n]",
886
+ "downloads/books/04-cli/developers.md": "# CLI — Developers\n\n**Audience:** Engineers using the `mdreports` binary.\n\n---\n\n## 1. Install\n\n```bash\nnpm install -g @x12i/mdreports-cli\nnpx playwright install chromium\n```\n\nBinary name: `mdreports`.\n\n---\n\n## 2. Render\n\n```bash\nmdreports render --in report.md --template clean-report --format pdf --out report.pdf\nmdreports render --in report.md --template letter --format docx\nmdreports render --in report.md --template clean-report --format pptx\nmdreports render --in report.md --template technical-doc --format html\n```\n\n---\n\n## 3. Templates\n\n```bash\nmdreports templates list\nmdreports templates list --json\nmdreports templates show clean-report\nmdreports templates create-from-html --id my-layout --name \"My Layout\" \\\n --layout layout.html --styles styles.css\nmdreports templates create-from-image --id from-shot --name \"From Shot\" \\\n --image design.png\nmdreports templates delete my-layout\n```\n\n`--templates-dir` overrides the user templates directory on any command.\n",
887
+ "downloads/books/05-api/developers.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"1-run\",\n \"title\": \"1. Run\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"2-call-with-curl\",\n \"title\": \"2. Call with curl\",\n \"level\": 2,\n \"order\": 2\n },\n {\n \"slug\": \"3-typed-client\",\n \"title\": \"3. Typed client\",\n \"level\": 2,\n \"order\": 3\n },\n {\n \"slug\": \"4-route-summary\",\n \"title\": \"4. Route summary\",\n \"level\": 2,\n \"order\": 4\n }\n]",
888
+ "downloads/books/05-api/developers.md": "# HTTP API — Developers\n\n**Audience:** Engineers running or calling `@x12i/mdreports-api`.\n\n---\n\n## 1. Run\n\n```bash\nnpm install -g @x12i/mdreports-api\nnpx playwright install chromium\nmdreports-api\n```\n\nOptional env:\n\n| Variable | Purpose |\n| --- | --- |\n| `MDREPORTS_API_PORT` / `PORT` | Listen port (default **6460**) |\n| `MDREPORTS_API_KEY` | If set, require `Authorization: Bearer <key>` (except `/health`) |\n| `MDREPORTS_TEMPLATES_DIR` | User templates directory |\n\n---\n\n## 2. Call with curl\n\n```bash\ncurl -s http://localhost:6460/health\n\ncurl -s http://localhost:6460/templates | jq .\n\ncurl -s -X POST http://localhost:6460/render/html \\\n -H 'content-type: application/json' \\\n -d '{\"markdown\":\"# Hello\",\"templateId\":\"clean-report\"}' | jq .\n\ncurl -s -X POST http://localhost:6460/render/pdf \\\n -H 'content-type: application/json' \\\n -d '{\"markdown\":\"# Hello\",\"templateId\":\"clean-report\"}' \\\n --output report.pdf\n\ncurl -s -X POST http://localhost:6460/render/pptx \\\n -H 'content-type: application/json' \\\n -d '{\"markdown\":\"# Hello\\n\\nSlide body\",\"templateId\":\"clean-report\"}' \\\n --output report.pptx\n```\n\n---\n\n## 3. Typed client\n\n```bash\nnpm install @x12i/mdreports-api-client\n```\n\n```ts\nimport { ApiClient } from \"@x12i/mdreports-api-client\";\n\nconst client = new ApiClient({\n baseUrl: \"http://localhost:6460\",\n apiKey: process.env.MDREPORTS_API_KEY\n});\n\nconst pdf = await client.renderPdf(\"# Hello\", \"clean-report\");\nconst templates = await client.listTemplates();\n```\n\n---\n\n## 4. Route summary\n\n| Method | Path | Description |\n| --- | --- |\n| `GET` | `/health` | Liveness (no auth) |\n| `GET` | `/templates` | List templates |\n| `GET` | `/templates/:id` | Get template |\n| `POST` | `/templates/from-html` | Create from HTML + CSS |\n| `POST` | `/templates/from-image` | Create from image (multipart) |\n| `PATCH` | `/templates/:id` | Update user template |\n| `DELETE` | `/templates/:id` | Delete user template |\n| `POST` | `/render/html` | Markdown → HTML JSON |\n| `POST` | `/render/pdf` | Markdown → PDF bytes |\n| `POST` | `/render/docx` | Markdown → DOCX bytes |\n| `POST` | `/render/pptx` | Markdown → PPTX bytes |\n",
889
+ "downloads/books/06-mcp/developers.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"1-run-configure\",\n \"title\": \"1. Run configure\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"2-tools\",\n \"title\": \"2. Tools\",\n \"level\": 2,\n \"order\": 2\n }\n]",
890
+ "downloads/books/06-mcp/developers.md": "# MCP — Developers\n\n**Audience:** Engineers wiring agents to Markdown Reports Studio.\n\n---\n\n## 1. Run configure\n\n```bash\nnpm install -g @x12i/mdreports-mcp-server\nnpx playwright install chromium\n```\n\nExample MCP client config:\n\n```json\n{\n \"mcpServers\": {\n \"mdreports\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@x12i/mdreports-mcp-server\"],\n \"env\": {\n \"ANTHROPIC_API_KEY\": \"optional\"\n }\n }\n }\n}\n```\n\nOptional: `MDREPORTS_TEMPLATES_DIR` for the user template store.\n\n---\n\n## 2. Tools\n\n- `list_templates` / `get_template`\n- `render_markdown_to_html` (returns HTML inline)\n- `render_markdown_to_pdf` / `render_markdown_to_docx` / `render_markdown_to_pptx` (write a file; optional `outPath`)\n- `create_template_from_html` / `create_template_from_image` / `delete_template`\n\nPPTX is always landscape 16:9; each `#` heading starts a new slide.\n",
891
+ "downloads/books/07-templates/builders.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"1-built-ins\",\n \"title\": \"1. Built-ins\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"2-layout-contract\",\n \"title\": \"2. Layout contract\",\n \"level\": 2,\n \"order\": 2\n },\n {\n \"slug\": \"3-user-templates\",\n \"title\": \"3. User templates\",\n \"level\": 2,\n \"order\": 3\n },\n {\n \"slug\": \"4-images-in-markdown\",\n \"title\": \"4. Images in Markdown\",\n \"level\": 2,\n \"order\": 4\n },\n {\n \"slug\": \"5-pptx\",\n \"title\": \"5. PPTX\",\n \"level\": 2,\n \"order\": 5\n }\n]",
892
+ "downloads/books/07-templates/builders.md": "# Templates — Builders\n\n**Audience:** Authors designing layouts in Studio or from HTML/CSS. \n**Twin:** [Developers version](../developers/BOOK.md)\n\n---\n\n## 1. Built-ins\n\nStart here before inventing a new layout:\n\n| Id | Best for |\n| --- | --- |\n| `clean-report` | Multi-section reports |\n| `letter` | Short correspondence |\n| `technical-doc` | Technical documentation |\n\n---\n\n## 2. Layout contract\n\nA template folder is three files:\n\n| File | Role |\n| --- | --- |\n| `template.json` | Id, name, page/theme/DOCX/PPTX styles, meta slots |\n| `layout.html` | Shell with `</head>` and `<!--CONTENT-->` |\n| `styles.css` | Look-and-feel injected into the shell |\n\nKeep slot names stable; renderers fill them from Markdown and frontmatter.\n\n---\n\n## 3. User templates\n\nYour custom templates live under `~/.mdreports/templates` (or a path your team sets). Built-ins are never overwritten.\n\nCreate from:\n\n- Studio UI (HTML or design screenshot)\n- CLI `create-from-html` / `create-from-image`\n- Asking an agent via MCP when configured\n\nScreenshot drafts need an Anthropic API key.\n\n---\n\n## 4. Images in Markdown\n\nPrefer absolute HTTPS image URLs in source Markdown so HTML and PDF previews stay reliable.\n\n---\n\n## 5. PPTX\n\nSlides are landscape 16:9. Structure decks with `#` headings — one H1 per slide. Put deck title in YAML frontmatter `title` for an opening title slide.\n",
893
+ "downloads/books/07-templates/developers.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"1-built-ins\",\n \"title\": \"1. Built-ins\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"2-layout-contract\",\n \"title\": \"2. Layout contract\",\n \"level\": 2,\n \"order\": 2\n },\n {\n \"slug\": \"3-user-templates\",\n \"title\": \"3. User templates\",\n \"level\": 2,\n \"order\": 3\n },\n {\n \"slug\": \"4-images-in-markdown\",\n \"title\": \"4. Images in Markdown\",\n \"level\": 2,\n \"order\": 4\n },\n {\n \"slug\": \"5-pptx\",\n \"title\": \"5. PPTX\",\n \"level\": 2,\n \"order\": 5\n }\n]",
894
+ "downloads/books/07-templates/developers.md": "# Templates — Developers\n\n**Audience:** Engineers integrating template stores and manifests. \n**Twin:** [Builders version](../builders/BOOK.md)\n\n---\n\n## 1. Built-ins\n\nShipped in `@x12i/mdreports-templates` (read-only):\n\n| Id | Use |\n| --- | --- |\n| `clean-report` | General multi-section reports |\n| `letter` | Letters / short correspondence |\n| `technical-doc` | Technical documentation |\n\n---\n\n## 2. Layout contract\n\nEvery template directory needs:\n\n1. `template.json` — manifest (validated by `TemplateManifestSchema`)\n2. `layout.html` — must include `</head>` and slot tokens\n3. `styles.css` — injected before `</head>`\n\nCommon HTML slots:\n\n- `<!--CONTENT-->` — rendered Markdown body (required)\n- `<!--TITLE-->` — document title\n- additional `metaSlots` declared in the manifest\n\n---\n\n## 3. User templates\n\nWritable location (never overwrites built-ins):\n\n- default: `~/.mdreports/templates`\n- override: `MDREPORTS_TEMPLATES_DIR`, SDK `templatesDir`, or CLI `--templates-dir`\n\nCreate via CLI, SDK `TemplateStore#createFromHtml` / `createTemplateFromImage`, API, MCP, or Studio.\n\n`create-from-image` needs `ANTHROPIC_API_KEY`.\n\n---\n\n## 4. Images in Markdown\n\n- HTML/PDF: absolute `http(s)` URLs or data URIs\n- DOCX / PPTX: local paths and URLs are best-effort; failures become placeholders\n\n---\n\n## 5. PPTX\n\nEvery manifest includes a `pptx` block. Built-ins and new templates default to **landscape 16:9** (13.333″ × 7.5″).\n\n- Each `#` (H1) starts a new slide\n- Optional title slide when a document title is present (frontmatter / first heading)\n",
895
+ "downloads/use-cases/author-templates.md": "# Author and store templates\n\n> **Use case id:** `author-templates`\n> **Goal:** Understand the template directory contract, built-ins, user store, and PPTX rules.\n> **Audiences:** developers, builders\n> **Tags:** templates, studio\n\n## Reading path\n\n1. **Templates** (builders) → chapters: `1-built-ins`, `2-layout-contract`, `3-user-templates`, `4-images-in-markdown`, `5-pptx`\n\n## From: Templates — 1. Built-ins\n\nStart here before inventing a new layout:\n\n| Id | Best for |\n| --- | --- |\n| `clean-report` | Multi-section reports |\n| `letter` | Short correspondence |\n| `technical-doc` | Technical documentation |\n\n---\n\n## From: Templates — 2. Layout contract\n\nA template folder is three files:\n\n| File | Role |\n| --- | --- |\n| `template.json` | Id, name, page/theme/DOCX/PPTX styles, meta slots |\n| `layout.html` | Shell with `</head>` and `<!--CONTENT-->` |\n| `styles.css` | Look-and-feel injected into the shell |\n\nKeep slot names stable; renderers fill them from Markdown and frontmatter.\n\n---\n\n## From: Templates — 3. User templates\n\nYour custom templates live under `~/.mdreports/templates` (or a path your team sets). Built-ins are never overwritten.\n\nCreate from:\n\n- Studio UI (HTML or design screenshot)\n- CLI `create-from-html` / `create-from-image`\n- Asking an agent via MCP when configured\n\nScreenshot drafts need an Anthropic API key.\n\n---\n\n## From: Templates — 4. Images in Markdown\n\nPrefer absolute HTTPS image URLs in source Markdown so HTML and PDF previews stay reliable.\n\n---\n\n## From: Templates — 5. PPTX\n\nSlides are landscape 16:9. Structure decks with `#` headings — one H1 per slide. Put deck title in YAML frontmatter `title` for an opening title slide.\n\n## Also see\n\n- **Templates** (`07-templates`) — Template directory contract, built-ins, user store, and PPTX slide rules.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
896
+ "downloads/use-cases/call-http-api.md": "# Run and call the HTTP API\n\n> **Use case id:** `call-http-api`\n> **Goal:** Start mdreports-api and render via curl or the typed client.\n> **Audiences:** developers\n> **Tags:** api, http\n\n## Reading path\n\n1. **HTTP API** (developers) → chapters: `1-run`, `2-call-with-curl`, `3-typed-client`, `4-route-summary`\n\n## From: HTTP API — 1. Run\n\n```bash\nnpm install -g @x12i/mdreports-api\nnpx playwright install chromium\nmdreports-api\n```\n\nOptional env:\n\n| Variable | Purpose |\n| --- | --- |\n| `MDREPORTS_API_PORT` / `PORT` | Listen port (default **6460**) |\n| `MDREPORTS_API_KEY` | If set, require `Authorization: Bearer <key>` (except `/health`) |\n| `MDREPORTS_TEMPLATES_DIR` | User templates directory |\n\n---\n\n## From: HTTP API — 2. Call with curl\n\n```bash\ncurl -s http://localhost:6460/health\n\ncurl -s http://localhost:6460/templates | jq .\n\ncurl -s -X POST http://localhost:6460/render/html \\\n -H 'content-type: application/json' \\\n -d '{\"markdown\":\"# Hello\",\"templateId\":\"clean-report\"}' | jq .\n\ncurl -s -X POST http://localhost:6460/render/pdf \\\n -H 'content-type: application/json' \\\n -d '{\"markdown\":\"# Hello\",\"templateId\":\"clean-report\"}' \\\n --output report.pdf\n\ncurl -s -X POST http://localhost:6460/render/pptx \\\n -H 'content-type: application/json' \\\n -d '{\"markdown\":\"# Hello\\n\\nSlide body\",\"templateId\":\"clean-report\"}' \\\n --output report.pptx\n```\n\n---\n\n## From: HTTP API — 3. Typed client\n\n```bash\nnpm install @x12i/mdreports-api-client\n```\n\n```ts\nimport { ApiClient } from \"@x12i/mdreports-api-client\";\n\nconst client = new ApiClient({\n baseUrl: \"http://localhost:6460\",\n apiKey: process.env.MDREPORTS_API_KEY\n});\n\nconst pdf = await client.renderPdf(\"# Hello\", \"clean-report\");\nconst templates = await client.listTemplates();\n```\n\n---\n\n## From: HTTP API — 4. Route summary\n\n| Method | Path | Description |\n| --- | --- |\n| `GET` | `/health` | Liveness (no auth) |\n| `GET` | `/templates` | List templates |\n| `GET` | `/templates/:id` | Get template |\n| `POST` | `/templates/from-html` | Create from HTML + CSS |\n| `POST` | `/templates/from-image` | Create from image (multipart) |\n| `PATCH` | `/templates/:id` | Update user template |\n| `DELETE` | `/templates/:id` | Delete user template |\n| `POST` | `/render/html` | Markdown → HTML JSON |\n| `POST` | `/render/pdf` | Markdown → PDF bytes |\n| `POST` | `/render/docx` | Markdown → DOCX bytes |\n| `POST` | `/render/pptx` | Markdown → PPTX bytes |\n\n## Also see\n\n- **HTTP API** (`05-api`) — Run mdreports-api and call it with curl or @x12i/mdreports-api-client.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
897
+ "downloads/use-cases/map-packages.md": "# Map the @x12i/mdreports-* packages\n\n> **Use case id:** `map-packages`\n> **Goal:** Know which npm package owns core, CLI, API, client, MCP, types, and templates.\n> **Audiences:** developers\n> **Tags:** packages, npm\n\n## Reading path\n\n1. **Packages** (developers) → chapters: `1-package-table`, `2-dependency-shape`, `3-naming-note`\n\n## From: Packages — 1. Package table\n\n| Package | When to install |\n| --- | --- |\n| `@x12i/mdreports-core` | In-process HTML/PDF/DOCX/PPTX + `TemplateStore` |\n| `@x12i/mdreports-cli` | Shell command `mdreports` |\n| `@x12i/mdreports-api` | Network service `mdreports-api` |\n| `@x12i/mdreports-api-client` | Typed `fetch` client for the HTTP API |\n| `@x12i/mdreports-mcp-server` | MCP tools over stdio |\n| `@x12i/mdreports-types` | Shared Zod schemas / TS types |\n| `@x12i/mdreports-templates` | Rarely — pulled in by core |\n\nNot published: `apps/playground`, `apps/studio` (run from this monorepo).\n\nKnowledge for agents/humans: `@x12i/mdreports-docs` (this library) — install as a **devDependency** only.\n\n---\n\n## From: Packages — 2. Dependency shape\n\n```\n@x12i/mdreports-types\n ↑\n@x12i/mdreports-templates ──→ @x12i/mdreports-core ──→ CLI / API / MCP\n ↓\n @x12i/mdreports-api-client (HTTP → API)\n```\n\nCore formats: **HTML**, **PDF**, **DOCX**, and landscape **PPTX** (H1 = new slide).\n\n---\n\n## From: Packages — 3. Naming note\n\nShort names like `@x12i/core` / `@x12i/cli` are already used by another x12i project on npm, so this product publishes under `@x12i/mdreports-*`.\n\n## Also see\n\n- **Packages** (`01-packages`) — Which npm package to install for SDK, CLI, API, client, MCP, types, and templates.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
898
+ "downloads/use-cases/orient-mdreports.md": "# Orient on Markdown Reports Studio\n\n> **Use case id:** `orient-mdreports`\n> **Goal:** Understand formats, surfaces, and the one render pipeline before installing anything.\n> **Audiences:** developers, builders\n> **Tags:** platform, start-here\n\n## Reading path\n\n1. **Overview** (developers) → chapters: `1-what-it-is`, `2-formats-and-surfaces`, `3-how-rendering-works`, `4-where-to-go-next`\n\n## From: Overview — 1. What it is\n\nTurn Markdown into styled **PDF**, **Word (DOCX)**, **PowerPoint (PPTX)**, and **HTML** using swappable templates.\n\n**Not** a CMS or collaborative editor — a render pipeline: Markdown in, branded document out.\n\nOne engine powers every surface: SDK, CLI, HTTP API, MCP server, Playground UI, and Studio UI.\n\n---\n\n## From: Overview — 2. Formats and surfaces\n\n| Capability | Details |\n| --- | --- |\n| Formats | HTML, PDF (Playwright Chromium), DOCX, PPTX (landscape 16:9) |\n| Templates | Built-ins (`clean-report`, `letter`, `technical-doc`) + your own |\n| Frontmatter | YAML (e.g. `title`) fills template slots |\n| Surfaces | SDK, CLI (`mdreports`), HTTP API, MCP, Playground (`:6461`), Studio (`:6463`) |\n\nAll published packages are public under `@x12i/mdreports-*` on npm.\n\nPDF needs Chromium once per machine: `npx playwright install chromium`. Requires **Node.js 20.11+**.\n\n---\n\n## From: Overview — 3. How rendering works\n\n1. **Parse** Markdown (including YAML frontmatter).\n2. **Load template** by id — built-in or user template from disk.\n3. **Inject** CSS into `layout.html` and fill slots (`<!--CONTENT-->`, `<!--TITLE-->`, meta slots).\n4. **Emit** HTML string, PDF via pooled Chromium, DOCX/PPTX from the Markdown AST.\n\nAlways call `shutdown()` in SDK/long-lived processes so the browser exits cleanly.\n\n### Known limitations\n\n- **HTML/PDF images**: absolute `http(s)` URLs or data URIs only.\n- **DOCX / PPTX images**: local paths and URLs are best-effort; failures become `[image: alt]`.\n- **DOCX / PPTX code blocks**: monospace + shading — no syntax highlighting.\n- **PPTX overflow**: long content under a single H1 is not auto-split (may clip).\n- **Raw HTML in Markdown**: kept for HTML/PDF; dropped for DOCX and PPTX.\n\n---\n\n## From: Overview — 4. Where to go next\n\n| Goal | Book / use case |\n| --- | --- |\n| First successful file | Getting Started · `pick-a-surface` |\n| Which package to install | Packages · `map-packages` |\n| Custom look | Templates · `author-templates` |\n| Agent tools | MCP · `wire-mcp-agents` |\n\n## Also see\n\n- **Overview** (`00-overview`) — Surfaces, formats, and the render pipeline — where Markdown Reports Studio fits.\n- **Getting Started** (`02-getting-started`) — CLI, SDK, HTTP API, or MCP — first successful PDF/DOCX/PPTX in minutes.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
899
+ "downloads/use-cases/pick-a-surface.md": "# Pick a surface and first render\n\n> **Use case id:** `pick-a-surface`\n> **Goal:** Choose CLI, SDK, API, or MCP and produce a first PDF/DOCX/PPTX.\n> **Audiences:** developers, builders\n> **Tags:** getting-started, quickstart\n\n## Reading path\n\n1. **Getting Started** (developers) → chapters: `1-prerequisites`, `2-option-a-cli`, `3-option-b-sdk`, `4-option-c-http-api`, `5-option-d-mcp`, `6-built-in-templates`\n\n## From: Getting Started — 1. Prerequisites\n\n- Node.js **20.11+**\n- Chromium for PDF: `npx playwright install chromium`\n\n---\n\n## From: Getting Started — 2. Option A — CLI\n\n```bash\nnpm install -g @x12i/mdreports-cli\nnpx playwright install chromium\n\nmdreports templates list\nmdreports render --in report.md --template clean-report --format pdf --out report.pdf\nmdreports render --in report.md --template clean-report --format pptx --out report.pptx\n```\n\n---\n\n## From: Getting Started — 3. Option B — SDK\n\n```bash\nnpm install @x12i/mdreports-core\nnpx playwright install chromium\n```\n\n```ts\nimport { renderToPdf, renderToPptx, shutdown } from \"@x12i/mdreports-core\";\nimport { writeFile } from \"node:fs/promises\";\n\nconst pdf = await renderToPdf(\"# Hello\\n\\nWorld\", \"clean-report\");\nawait writeFile(\"report.pdf\", pdf);\n\nconst pptx = await renderToPptx(\"# Hello\\n\\nWorld\", \"clean-report\");\nawait writeFile(\"report.pptx\", pptx);\nawait shutdown();\n```\n\n---\n\n## From: Getting Started — 4. Option C — HTTP API\n\n```bash\nnpm install -g @x12i/mdreports-api\nnpx playwright install chromium\nmdreports-api # http://localhost:6460\n```\n\n```ts\nimport { ApiClient } from \"@x12i/mdreports-api-client\";\n\nconst client = new ApiClient({ baseUrl: \"http://localhost:6460\" });\nconst pdf = await client.renderPdf(\"# Hello\", \"clean-report\");\n```\n\n---\n\n## From: Getting Started — 5. Option D — MCP\n\n```json\n{\n \"mcpServers\": {\n \"mdreports\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@x12i/mdreports-mcp-server\"]\n }\n }\n}\n```\n\n---\n\n## From: Getting Started — 6. Built-in templates\n\n- `clean-report` — multi-section reports\n- `letter` — short correspondence\n- `technical-doc` — technical documentation\n\nCreate your own with CLI `templates create-from-html` / `create-from-image`, the SDK, or Studio.\n\n## Also see\n\n- **Packages** (`01-packages`) — Which npm package to install for SDK, CLI, API, client, MCP, types, and templates.\n- **Getting Started** (`02-getting-started`) — CLI, SDK, HTTP API, or MCP — first successful PDF/DOCX/PPTX in minutes.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
900
+ "downloads/use-cases/render-with-cli.md": "# Render from the CLI\n\n> **Use case id:** `render-with-cli`\n> **Goal:** Use mdreports render and templates commands from the shell.\n> **Audiences:** developers\n> **Tags:** cli\n\n## Reading path\n\n1. **CLI** (developers) → chapters: `1-install`, `2-render`, `3-templates`\n\n## From: CLI — 1. Install\n\n```bash\nnpm install -g @x12i/mdreports-cli\nnpx playwright install chromium\n```\n\nBinary name: `mdreports`.\n\n---\n\n## From: CLI — 2. Render\n\n```bash\nmdreports render --in report.md --template clean-report --format pdf --out report.pdf\nmdreports render --in report.md --template letter --format docx\nmdreports render --in report.md --template clean-report --format pptx\nmdreports render --in report.md --template technical-doc --format html\n```\n\n---\n\n## From: CLI — 3. Templates\n\n```bash\nmdreports templates list\nmdreports templates list --json\nmdreports templates show clean-report\nmdreports templates create-from-html --id my-layout --name \"My Layout\" \\\n --layout layout.html --styles styles.css\nmdreports templates create-from-image --id from-shot --name \"From Shot\" \\\n --image design.png\nmdreports templates delete my-layout\n```\n\n`--templates-dir` overrides the user templates directory on any command.\n\n## Also see\n\n- **CLI** (`04-cli`) — Render from the shell and manage templates with create-from-html / create-from-image.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
901
+ "downloads/use-cases/render-with-sdk.md": "# Render in-process with the SDK\n\n> **Use case id:** `render-with-sdk`\n> **Goal:** Call renderToHtml/Pdf/Docx/Pptx, shut down Chromium, and use TemplateStore.\n> **Audiences:** developers\n> **Tags:** sdk, core\n\n## Reading path\n\n1. **SDK** (developers) → chapters: `1-install`, `2-render`, `3-template-store`, `4-ai-template-from-image`\n\n## From: SDK — 1. Install\n\n```bash\nnpm install @x12i/mdreports-core\nnpx playwright install chromium\n```\n\n---\n\n## From: SDK — 2. Render\n\n```ts\nimport { renderToHtml, renderToPdf, renderToDocx, renderToPptx, shutdown } from \"@x12i/mdreports-core\";\n\nconst md = `---\ntitle: Q1 Report\n---\n\n# Summary\n\nBody here.\n`;\n\nconst { html, title } = await renderToHtml(md, \"clean-report\");\nconst pdf = await renderToPdf(md, \"clean-report\", {\n pdf: { format: \"Letter\", landscape: false }\n});\nconst docx = await renderToDocx(md, \"technical-doc\");\nconst pptx = await renderToPptx(md, \"clean-report\"); // landscape 16:9; each H1 = new slide\n\nawait shutdown();\n```\n\nAlways call `shutdown()` when your process is done (or on SIGTERM in long-lived servers) so Playwright exits cleanly.\n\n---\n\n## From: SDK — 3. Template store\n\n```ts\nimport { TemplateStore } from \"@x12i/mdreports-core\";\n\nconst store = new TemplateStore({\n templatesDir: \"./my-templates\" // optional; else MDREPORTS_TEMPLATES_DIR or ~/.mdreports/templates\n});\n\nconst all = await store.list();\nconst one = await store.get(\"clean-report\");\n\nawait store.createFromHtml({\n id: \"brand-report\",\n name: \"Brand Report\",\n layoutHtml: \"<!doctype html><html><head></head><body><main><!--CONTENT--></main></body></html>\",\n stylesCss: \"main { max-width: 720px; margin: 0 auto; }\"\n});\n\nawait store.update(\"brand-report\", { name: \"Brand Report v2\" });\nawait store.delete(\"brand-report\");\n```\n\nBuilt-in templates cannot be updated or deleted.\n\n---\n\n## From: SDK — 4. AI template from image\n\n```ts\nimport { readFile } from \"node:fs/promises\";\nimport { createTemplateFromImage, shutdown } from \"@x12i/mdreports-core\";\n\nconst imageBuffer = await readFile(\"design.png\");\nawait createTemplateFromImage({\n id: \"from-design\",\n name: \"From Design\",\n imageBuffer,\n imageMediaType: \"image/png\",\n anthropicApiKey: process.env.ANTHROPIC_API_KEY!\n});\nawait shutdown();\n```\n\n## Also see\n\n- **SDK** (`03-sdk`) — In-process HTML/PDF/DOCX/PPTX render, TemplateStore, and create-from-image.\n- **Templates** (`07-templates`) — Template directory contract, built-ins, user store, and PPTX slide rules.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
902
+ "downloads/use-cases/wire-mcp-agents.md": "# Wire MCP tools for agents\n\n> **Use case id:** `wire-mcp-agents`\n> **Goal:** Install the MCP server and expose render/template tools to Cursor or Claude.\n> **Audiences:** developers\n> **Tags:** mcp, agents\n\n## Reading path\n\n1. **MCP** (developers) → chapters: `1-run-configure`, `2-tools`\n\n## From: MCP — 1. Run configure\n\n```bash\nnpm install -g @x12i/mdreports-mcp-server\nnpx playwright install chromium\n```\n\nExample MCP client config:\n\n```json\n{\n \"mcpServers\": {\n \"mdreports\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@x12i/mdreports-mcp-server\"],\n \"env\": {\n \"ANTHROPIC_API_KEY\": \"optional\"\n }\n }\n }\n}\n```\n\nOptional: `MDREPORTS_TEMPLATES_DIR` for the user template store.\n\n---\n\n## From: MCP — 2. Tools\n\n- `list_templates` / `get_template`\n- `render_markdown_to_html` (returns HTML inline)\n- `render_markdown_to_pdf` / `render_markdown_to_docx` / `render_markdown_to_pptx` (write a file; optional `outPath`)\n- `create_template_from_html` / `create_template_from_image` / `delete_template`\n\nPPTX is always landscape 16:9; each `#` heading starts a new slide.\n\n## Also see\n\n- **MCP** (`06-mcp`) — Wire @x12i/mdreports-mcp-server into Cursor or Claude for render and template tools.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
903
+ "guides/pick-a-surface.md": "---\nid: \"pick-a-surface\"\ntype: \"guide\"\ntitle: \"Pick a surface\"\nsummary: \"Choose CLI, SDK, HTTP API, MCP, Playground, or Studio for your first successful render.\"\nwhy: \"The same engine backs every surface — install only what your workflow needs.\"\naudiences: [\"developers\", \"builders\"]\nprerequisites: [\"render-pipeline\"]\nconfirmationRequired: false\n---\n# Pick a surface\n\n# Pick a surface\n\n## Use this when\n\nYou know you want Markdown → PDF/DOCX/PPTX/HTML and need the smallest install path.\n\n## Do not use this when\n\nYou are designing template HTML/CSS only — open Studio after a local `pnpm dev` instead.\n\n## Steps\n\n1. **CLI** — `npm i -g @x12i/mdreports-cli` then `mdreports render --in report.md --template clean-report --format pdf`.\n2. **SDK** — `npm i @x12i/mdreports-core` and call `renderToPdf` / `renderToDocx` / `renderToPptx` / `renderToHtml`.\n3. **HTTP API** — `npm i -g @x12i/mdreports-api` → `mdreports-api` on port **6460**; optional `@x12i/mdreports-api-client`.\n4. **MCP** — wire `@x12i/mdreports-mcp-server` into your agent client.\n5. **Playground / Studio** — from this monorepo, `pnpm dev` (:6461 / :6463).\n\nAlways install Chromium once for PDF: `npx playwright install chromium`.\n\n## Verification\n\nYou have a non-empty PDF/DOCX/PPTX/HTML file from the same Markdown + `clean-report` template.\n\n## Recovery\n\nIf PDF fails, reinstall Chromium. If a template is missing, `mdreports templates list` and confirm built-ins or your `MDREPORTS_TEMPLATES_DIR`.",
904
+ "INDEX.md": "# mdreports — knowledge index\n\nPackage: `@x12i/mdreports-docs`\n\n## How to choose\n\n- **Concept** — what it is and why it exists\n- **Guide** — bounded task procedure\n- **Scenario** — state + evidence → which path\n- **Use case** — end-to-end outcome\n- **Tutorial** — learn by doing\n- **Decision** — options and recommended default\n- **Reference / API** — exact technical detail\n\n## Manifest and search\n\n- `agent-manifest.json`\n- `SEARCH.json`\n\n## Concepts\n\n- `render-pipeline` — **Render pipeline** — Markdown plus a template id becomes HTML, PDF, DOCX, or PPTX through one shared engine. — [concepts/render-pipeline.md](concepts/render-pipeline.md)\n\n## Guides\n\n- `pick-a-surface` — **Pick a surface** — Choose CLI, SDK, HTTP API, MCP, Playground, or Studio for your first successful render. — [guides/pick-a-surface.md](guides/pick-a-surface.md)\n\n## Scenarios\n\n- `choose-integrate-or-ui` — **Choose integrate-or-UI path** — Decide whether to embed the engine in code or use the local UIs first. — [scenarios/choose-integrate-or-ui.md](scenarios/choose-integrate-or-ui.md)\n\n## Diagrams\n\n_None authored yet._\n\n## Tutorials\n\n_None authored yet._\n",
905
+ "indexes/books.json": "{\n \"version\": 1,\n \"items\": [\n {\n \"id\": \"00-overview\",\n \"title\": \"Overview\",\n \"summary\": \"Surfaces, formats, and the render pipeline — where Markdown Reports Studio fits.\",\n \"path\": \"books/00-overview/\"\n },\n {\n \"id\": \"01-packages\",\n \"title\": \"Packages\",\n \"summary\": \"Which npm package to install for SDK, CLI, API, client, MCP, types, and templates.\",\n \"path\": \"books/01-packages/\"\n },\n {\n \"id\": \"02-getting-started\",\n \"title\": \"Getting Started\",\n \"summary\": \"CLI, SDK, HTTP API, or MCP — first successful PDF/DOCX/PPTX in minutes.\",\n \"path\": \"books/02-getting-started/\"\n },\n {\n \"id\": \"03-sdk\",\n \"title\": \"SDK\",\n \"summary\": \"In-process HTML/PDF/DOCX/PPTX render, TemplateStore, and create-from-image.\",\n \"path\": \"books/03-sdk/\"\n },\n {\n \"id\": \"04-cli\",\n \"title\": \"CLI\",\n \"summary\": \"Render from the shell and manage templates with create-from-html / create-from-image.\",\n \"path\": \"books/04-cli/\"\n },\n {\n \"id\": \"05-api\",\n \"title\": \"HTTP API\",\n \"summary\": \"Run mdreports-api and call it with curl or @x12i/mdreports-api-client.\",\n \"path\": \"books/05-api/\"\n },\n {\n \"id\": \"06-mcp\",\n \"title\": \"MCP\",\n \"summary\": \"Wire @x12i/mdreports-mcp-server into Cursor or Claude for render and template tools.\",\n \"path\": \"books/06-mcp/\"\n },\n {\n \"id\": \"07-templates\",\n \"title\": \"Templates\",\n \"summary\": \"Template directory contract, built-ins, user store, and PPTX slide rules.\",\n \"path\": \"books/07-templates/\"\n }\n ]\n}",
906
+ "indexes/books.md": "# books\n\n- `00-overview` — Overview — Surfaces, formats, and the render pipeline — where Markdown Reports Studio fits.\n- `01-packages` — Packages — Which npm package to install for SDK, CLI, API, client, MCP, types, and templates.\n- `02-getting-started` — Getting Started — CLI, SDK, HTTP API, or MCP — first successful PDF/DOCX/PPTX in minutes.\n- `03-sdk` — SDK — In-process HTML/PDF/DOCX/PPTX render, TemplateStore, and create-from-image.\n- `04-cli` — CLI — Render from the shell and manage templates with create-from-html / create-from-image.\n- `05-api` — HTTP API — Run mdreports-api and call it with curl or @x12i/mdreports-api-client.\n- `06-mcp` — MCP — Wire @x12i/mdreports-mcp-server into Cursor or Claude for render and template tools.\n- `07-templates` — Templates — Template directory contract, built-ins, user store, and PPTX slide rules.\n",
907
+ "indexes/concepts.json": "{\n \"version\": 1,\n \"items\": [\n {\n \"id\": \"render-pipeline\",\n \"title\": \"Render pipeline\",\n \"summary\": \"Markdown plus a template id becomes HTML, PDF, DOCX, or PPTX through one shared engine.\",\n \"path\": \"concepts/render-pipeline.md\"\n }\n ]\n}",
908
+ "indexes/concepts.md": "# concepts\n\n- `render-pipeline` — Render pipeline — Markdown plus a template id becomes HTML, PDF, DOCX, or PPTX through one shared engine.\n",
909
+ "indexes/diagrams.json": "{\n \"version\": 1,\n \"items\": []\n}",
910
+ "indexes/diagrams.md": "# diagrams\n\n\n",
911
+ "indexes/guides.json": "{\n \"version\": 1,\n \"items\": [\n {\n \"id\": \"pick-a-surface\",\n \"title\": \"Pick a surface\",\n \"summary\": \"Choose CLI, SDK, HTTP API, MCP, Playground, or Studio for your first successful render.\",\n \"path\": \"guides/pick-a-surface.md\"\n }\n ]\n}",
912
+ "indexes/guides.md": "# guides\n\n- `pick-a-surface` — Pick a surface — Choose CLI, SDK, HTTP API, MCP, Playground, or Studio for your first successful render.\n",
913
+ "indexes/scenarios.json": "{\n \"version\": 1,\n \"items\": [\n {\n \"id\": \"choose-integrate-or-ui\",\n \"title\": \"Choose integrate-or-UI path\",\n \"summary\": \"Decide whether to embed the engine in code or use the local UIs first.\",\n \"path\": \"scenarios/choose-integrate-or-ui.md\"\n }\n ]\n}",
914
+ "indexes/scenarios.md": "# scenarios\n\n- `choose-integrate-or-ui` — Choose integrate-or-UI path — Decide whether to embed the engine in code or use the local UIs first.\n",
915
+ "indexes/tutorials.json": "{\n \"version\": 1,\n \"items\": []\n}",
916
+ "indexes/tutorials.md": "# tutorials\n\n\n",
917
+ "indexes/use-cases.json": "{\n \"version\": 1,\n \"items\": [\n {\n \"id\": \"orient-mdreports\",\n \"title\": \"Orient on Markdown Reports Studio\",\n \"summary\": \"Understand formats, surfaces, and the one render pipeline before installing anything.\",\n \"path\": \"use-cases/orient-mdreports.md\"\n },\n {\n \"id\": \"pick-a-surface\",\n \"title\": \"Pick a surface and first render\",\n \"summary\": \"Choose CLI, SDK, API, or MCP and produce a first PDF/DOCX/PPTX.\",\n \"path\": \"use-cases/pick-a-surface.md\"\n },\n {\n \"id\": \"map-packages\",\n \"title\": \"Map the @x12i/mdreports-* packages\",\n \"summary\": \"Know which npm package owns core, CLI, API, client, MCP, types, and templates.\",\n \"path\": \"use-cases/map-packages.md\"\n },\n {\n \"id\": \"render-with-sdk\",\n \"title\": \"Render in-process with the SDK\",\n \"summary\": \"Call renderToHtml/Pdf/Docx/Pptx, shut down Chromium, and use TemplateStore.\",\n \"path\": \"use-cases/render-with-sdk.md\"\n },\n {\n \"id\": \"render-with-cli\",\n \"title\": \"Render from the CLI\",\n \"summary\": \"Use mdreports render and templates commands from the shell.\",\n \"path\": \"use-cases/render-with-cli.md\"\n },\n {\n \"id\": \"call-http-api\",\n \"title\": \"Run and call the HTTP API\",\n \"summary\": \"Start mdreports-api and render via curl or the typed client.\",\n \"path\": \"use-cases/call-http-api.md\"\n },\n {\n \"id\": \"wire-mcp-agents\",\n \"title\": \"Wire MCP tools for agents\",\n \"summary\": \"Install the MCP server and expose render/template tools to Cursor or Claude.\",\n \"path\": \"use-cases/wire-mcp-agents.md\"\n },\n {\n \"id\": \"author-templates\",\n \"title\": \"Author and store templates\",\n \"summary\": \"Understand the template directory contract, built-ins, user store, and PPTX rules.\",\n \"path\": \"use-cases/author-templates.md\"\n }\n ]\n}",
918
+ "indexes/use-cases.md": "# use-cases\n\n- `orient-mdreports` — Orient on Markdown Reports Studio — Understand formats, surfaces, and the one render pipeline before installing anything.\n- `pick-a-surface` — Pick a surface and first render — Choose CLI, SDK, API, or MCP and produce a first PDF/DOCX/PPTX.\n- `map-packages` — Map the @x12i/mdreports-* packages — Know which npm package owns core, CLI, API, client, MCP, types, and templates.\n- `render-with-sdk` — Render in-process with the SDK — Call renderToHtml/Pdf/Docx/Pptx, shut down Chromium, and use TemplateStore.\n- `render-with-cli` — Render from the CLI — Use mdreports render and templates commands from the shell.\n- `call-http-api` — Run and call the HTTP API — Start mdreports-api and render via curl or the typed client.\n- `wire-mcp-agents` — Wire MCP tools for agents — Install the MCP server and expose render/template tools to Cursor or Claude.\n- `author-templates` — Author and store templates — Understand the template directory contract, built-ins, user store, and PPTX rules.\n",
919
+ "knowledge.json": "{\n \"concepts\": [\n {\n \"summary\": \"Markdown plus a template id becomes HTML, PDF, DOCX, or PPTX through one shared engine.\",\n \"problem\": \"Teams reimplement Markdown rendering per surface and drift on templates, slots, and export fidelity.\",\n \"why\": \"One core (`@x12i/mdreports-core`) keeps CLI, API, MCP, Playground, and Studio on the same contract.\",\n \"mentalModel\": \"Parse Markdown → load template → inject CSS/slots → emit the requested format.\",\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"whenItMatters\": [],\n \"whenNotToUse\": [],\n \"prerequisites\": [],\n \"related\": [],\n \"next\": [\n \"pick-a-surface\"\n ],\n \"exampleIds\": [],\n \"commonMistakes\": [],\n \"successCriteria\": [],\n \"invariants\": [],\n \"alternatives\": [],\n \"tags\": [],\n \"id\": \"render-pipeline\",\n \"type\": \"concept\",\n \"title\": \"Render pipeline\",\n \"visualIds\": [],\n \"diagramIds\": [],\n \"referenceIds\": []\n }\n ],\n \"guides\": [\n {\n \"summary\": \"Choose CLI, SDK, HTTP API, MCP, Playground, or Studio for your first successful render.\",\n \"why\": \"The same engine backs every surface — install only what your workflow needs.\",\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"whenItMatters\": [],\n \"whenNotToUse\": [],\n \"prerequisites\": [\n \"render-pipeline\"\n ],\n \"related\": [],\n \"next\": [],\n \"exampleIds\": [],\n \"commonMistakes\": [],\n \"successCriteria\": [],\n \"invariants\": [],\n \"alternatives\": [],\n \"confirmationRequired\": false,\n \"tags\": [],\n \"id\": \"pick-a-surface\",\n \"type\": \"guide\",\n \"title\": \"Pick a surface\",\n \"useWhen\": [],\n \"doNotUseWhen\": [],\n \"inputs\": [],\n \"permissions\": [],\n \"steps\": [],\n \"verification\": [],\n \"recovery\": [],\n \"tutorialIds\": [],\n \"referenceIds\": [],\n \"scenarioIds\": []\n }\n ],\n \"scenarios\": [\n {\n \"summary\": \"Decide whether to embed the engine in code or use the local UIs first.\",\n \"why\": \"Builders and developers share content but start from different entry points.\",\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"whenItMatters\": [],\n \"whenNotToUse\": [],\n \"prerequisites\": [\n \"render-pipeline\"\n ],\n \"related\": [\n \"pick-a-surface\"\n ],\n \"next\": [],\n \"exampleIds\": [],\n \"commonMistakes\": [],\n \"successCriteria\": [],\n \"invariants\": [],\n \"alternatives\": [],\n \"tags\": [],\n \"id\": \"choose-integrate-or-ui\",\n \"type\": \"scenario\",\n \"title\": \"Choose integrate-or-UI path\",\n \"situation\": \"You need branded documents from Markdown and are unsure whether to open Playground/Studio or install packages.\",\n \"preconditions\": [],\n \"signals\": [],\n \"decisionQuestion\": \"Should you start in the local UIs or install a package surface?\",\n \"paths\": [\n {\n \"id\": \"explore-ui\",\n \"label\": \"Explore in Playground/Studio\",\n \"when\": \"You prefer live preview over npm while iterating on Markdown or templates\",\n \"guideIds\": [\n \"pick-a-surface\"\n ],\n \"expectedOutcome\": \"Local preview on :6461 / :6463 via pnpm dev\"\n },\n {\n \"id\": \"embed-core\",\n \"label\": \"Embed the SDK\",\n \"when\": \"You need in-process renders inside a Node service\",\n \"guideIds\": [\n \"pick-a-surface\"\n ],\n \"expectedOutcome\": \"`@x12i/mdreports-core` installed and rendering\"\n },\n {\n \"id\": \"shell-cli\",\n \"label\": \"Use the CLI\",\n \"when\": \"You need one-off or CI shell jobs\",\n \"guideIds\": [\n \"pick-a-surface\"\n ],\n \"expectedOutcome\": \"mdreports render producing PDF/DOCX/PPTX/HTML\"\n },\n {\n \"id\": \"agent-mcp\",\n \"label\": \"Wire MCP for agents\",\n \"when\": \"Agents must render or manage templates via tools\",\n \"guideIds\": [\n \"pick-a-surface\"\n ],\n \"expectedOutcome\": \"`@x12i/mdreports-mcp-server` configured in the agent client\"\n }\n ],\n \"verification\": [],\n \"recovery\": []\n }\n ],\n \"decisions\": [],\n \"glossary\": [],\n \"visuals\": [],\n \"diagrams\": [],\n \"relationships\": [],\n \"tutorials\": [],\n \"examples\": [],\n \"sampleData\": [],\n \"uiClients\": [],\n \"apis\": []\n}",
920
+ "packs/concept/render-pipeline/pack.json": "{\n \"id\": \"concept/render-pipeline\",\n \"type\": \"concept\",\n \"title\": \"Render pipeline\",\n \"summary\": \"Markdown plus a template id becomes HTML, PDF, DOCX, or PPTX through one shared engine.\",\n \"markdownPath\": \"concepts/render-pipeline.md\",\n \"files\": [\n \"concepts/render-pipeline.md\"\n ],\n \"related\": []\n}",
921
+ "packs/concept/render-pipeline/PACK.md": "---\nid: \"concept/render-pipeline\"\ntype: \"pack\"\ntitle: \"Render pipeline\"\nsummary: \"Markdown plus a template id becomes HTML, PDF, DOCX, or PPTX through one shared engine.\"\n---\n# Pack: Render pipeline\n\nMarkdown plus a template id becomes HTML, PDF, DOCX, or PPTX through one shared engine.\n\nPrimary markdown: `concepts/render-pipeline.md`\n",
922
+ "packs/guide/pick-a-surface/pack.json": "{\n \"id\": \"guide/pick-a-surface\",\n \"type\": \"guide\",\n \"title\": \"Pick a surface\",\n \"summary\": \"Choose CLI, SDK, HTTP API, MCP, Playground, or Studio for your first successful render.\",\n \"markdownPath\": \"guides/pick-a-surface.md\",\n \"files\": [\n \"guides/pick-a-surface.md\"\n ],\n \"related\": []\n}",
923
+ "packs/guide/pick-a-surface/PACK.md": "---\nid: \"guide/pick-a-surface\"\ntype: \"pack\"\ntitle: \"Pick a surface\"\nsummary: \"Choose CLI, SDK, HTTP API, MCP, Playground, or Studio for your first successful render.\"\n---\n# Pack: Pick a surface\n\nChoose CLI, SDK, HTTP API, MCP, Playground, or Studio for your first successful render.\n\nPrimary markdown: `guides/pick-a-surface.md`\n",
924
+ "packs/scenario/choose-integrate-or-ui/pack.json": "{\n \"id\": \"scenario/choose-integrate-or-ui\",\n \"type\": \"scenario\",\n \"title\": \"Choose integrate-or-UI path\",\n \"summary\": \"Decide whether to embed the engine in code or use the local UIs first.\",\n \"markdownPath\": \"scenarios/choose-integrate-or-ui.md\",\n \"files\": [\n \"scenarios/choose-integrate-or-ui.md\"\n ],\n \"related\": [\n \"pick-a-surface\"\n ]\n}",
925
+ "packs/scenario/choose-integrate-or-ui/PACK.md": "---\nid: \"scenario/choose-integrate-or-ui\"\ntype: \"pack\"\ntitle: \"Choose integrate-or-UI path\"\nsummary: \"Decide whether to embed the engine in code or use the local UIs first.\"\n---\n# Pack: Choose integrate-or-UI path\n\nDecide whether to embed the engine in code or use the local UIs first.\n\nPrimary markdown: `scenarios/choose-integrate-or-ui.md`\n",
926
+ "scenarios/choose-integrate-or-ui.md": "---\nid: \"choose-integrate-or-ui\"\ntype: \"scenario\"\ntitle: \"Choose integrate-or-UI path\"\nsummary: \"Decide whether to embed the engine in code or use the local UIs first.\"\naudiences: [\"developers\", \"builders\"]\n---\n# Choose integrate-or-UI path\n\n# Choose integrate-or-UI path\n\nStart with **Playground** only if you are iterating on Markdown/template look. Otherwise install the surface that matches how the document will be produced in production.\n\nFollow the Pick a surface guide for install commands.",
927
+ "SEARCH.json": "{\n \"version\": 1,\n \"product\": \"mdreports\",\n \"generatedAt\": \"2026-07-26T12:49:20.367Z\",\n \"records\": [\n {\n \"id\": \"render-pipeline\",\n \"type\": \"concept\",\n \"title\": \"Render pipeline\",\n \"summary\": \"Markdown plus a template id becomes HTML, PDF, DOCX, or PPTX through one shared engine.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"tags\": [],\n \"goals\": [],\n \"path\": \"concepts/render-pipeline.md\",\n \"webPath\": \"/concepts/render-pipeline\",\n \"prerequisites\": [],\n \"related\": [],\n \"packIds\": [\n \"concept/render-pipeline\"\n ]\n },\n {\n \"id\": \"pick-a-surface\",\n \"type\": \"guide\",\n \"title\": \"Pick a surface\",\n \"summary\": \"Choose CLI, SDK, HTTP API, MCP, Playground, or Studio for your first successful render.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"tags\": [],\n \"goals\": [],\n \"path\": \"guides/pick-a-surface.md\",\n \"webPath\": \"/guides/pick-a-surface\",\n \"prerequisites\": [\n \"render-pipeline\"\n ],\n \"related\": [],\n \"packIds\": [\n \"guide/pick-a-surface\"\n ]\n },\n {\n \"id\": \"choose-integrate-or-ui\",\n \"type\": \"scenario\",\n \"title\": \"Choose integrate-or-UI path\",\n \"summary\": \"Decide whether to embed the engine in code or use the local UIs first.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"tags\": [],\n \"goals\": [\n \"Should you start in the local UIs or install a package surface?\"\n ],\n \"path\": \"scenarios/choose-integrate-or-ui.md\",\n \"webPath\": \"/scenarios/choose-integrate-or-ui\",\n \"prerequisites\": [\n \"render-pipeline\"\n ],\n \"related\": [\n \"pick-a-surface\"\n ],\n \"packIds\": [\n \"scenario/choose-integrate-or-ui\"\n ]\n },\n {\n \"id\": \"orient-mdreports\",\n \"type\": \"use-case\",\n \"title\": \"Orient on Markdown Reports Studio\",\n \"summary\": \"Understand formats, surfaces, and the one render pipeline before installing anything.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"tags\": [\n \"platform\",\n \"start-here\"\n ],\n \"goals\": [\n \"Understand formats, surfaces, and the one render pipeline before installing anything.\"\n ],\n \"path\": \"use-cases/orient-mdreports.md\",\n \"webPath\": \"/use-cases#orient-mdreports\",\n \"prerequisites\": [],\n \"related\": [\n \"00-overview\",\n \"02-getting-started\"\n ],\n \"packIds\": [\n \"use-case/orient-mdreports\"\n ]\n },\n {\n \"id\": \"pick-a-surface\",\n \"type\": \"use-case\",\n \"title\": \"Pick a surface and first render\",\n \"summary\": \"Choose CLI, SDK, API, or MCP and produce a first PDF/DOCX/PPTX.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"tags\": [\n \"getting-started\",\n \"quickstart\"\n ],\n \"goals\": [\n \"Choose CLI, SDK, API, or MCP and produce a first PDF/DOCX/PPTX.\"\n ],\n \"path\": \"use-cases/pick-a-surface.md\",\n \"webPath\": \"/use-cases#pick-a-surface\",\n \"prerequisites\": [],\n \"related\": [\n \"01-packages\",\n \"02-getting-started\"\n ],\n \"packIds\": [\n \"use-case/pick-a-surface\"\n ]\n },\n {\n \"id\": \"map-packages\",\n \"type\": \"use-case\",\n \"title\": \"Map the @x12i/mdreports-* packages\",\n \"summary\": \"Know which npm package owns core, CLI, API, client, MCP, types, and templates.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\"\n ],\n \"tags\": [\n \"packages\",\n \"npm\"\n ],\n \"goals\": [\n \"Know which npm package owns core, CLI, API, client, MCP, types, and templates.\"\n ],\n \"path\": \"use-cases/map-packages.md\",\n \"webPath\": \"/use-cases#map-packages\",\n \"prerequisites\": [],\n \"related\": [\n \"01-packages\"\n ],\n \"packIds\": [\n \"use-case/map-packages\"\n ]\n },\n {\n \"id\": \"render-with-sdk\",\n \"type\": \"use-case\",\n \"title\": \"Render in-process with the SDK\",\n \"summary\": \"Call renderToHtml/Pdf/Docx/Pptx, shut down Chromium, and use TemplateStore.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\"\n ],\n \"tags\": [\n \"sdk\",\n \"core\"\n ],\n \"goals\": [\n \"Call renderToHtml/Pdf/Docx/Pptx, shut down Chromium, and use TemplateStore.\"\n ],\n \"path\": \"use-cases/render-with-sdk.md\",\n \"webPath\": \"/use-cases#render-with-sdk\",\n \"prerequisites\": [],\n \"related\": [\n \"03-sdk\",\n \"07-templates\"\n ],\n \"packIds\": [\n \"use-case/render-with-sdk\"\n ]\n },\n {\n \"id\": \"render-with-cli\",\n \"type\": \"use-case\",\n \"title\": \"Render from the CLI\",\n \"summary\": \"Use mdreports render and templates commands from the shell.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\"\n ],\n \"tags\": [\n \"cli\"\n ],\n \"goals\": [\n \"Use mdreports render and templates commands from the shell.\"\n ],\n \"path\": \"use-cases/render-with-cli.md\",\n \"webPath\": \"/use-cases#render-with-cli\",\n \"prerequisites\": [],\n \"related\": [\n \"04-cli\"\n ],\n \"packIds\": [\n \"use-case/render-with-cli\"\n ]\n },\n {\n \"id\": \"call-http-api\",\n \"type\": \"use-case\",\n \"title\": \"Run and call the HTTP API\",\n \"summary\": \"Start mdreports-api and render via curl or the typed client.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\"\n ],\n \"tags\": [\n \"api\",\n \"http\"\n ],\n \"goals\": [\n \"Start mdreports-api and render via curl or the typed client.\"\n ],\n \"path\": \"use-cases/call-http-api.md\",\n \"webPath\": \"/use-cases#call-http-api\",\n \"prerequisites\": [],\n \"related\": [\n \"05-api\"\n ],\n \"packIds\": [\n \"use-case/call-http-api\"\n ]\n },\n {\n \"id\": \"wire-mcp-agents\",\n \"type\": \"use-case\",\n \"title\": \"Wire MCP tools for agents\",\n \"summary\": \"Install the MCP server and expose render/template tools to Cursor or Claude.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\"\n ],\n \"tags\": [\n \"mcp\",\n \"agents\"\n ],\n \"goals\": [\n \"Install the MCP server and expose render/template tools to Cursor or Claude.\"\n ],\n \"path\": \"use-cases/wire-mcp-agents.md\",\n \"webPath\": \"/use-cases#wire-mcp-agents\",\n \"prerequisites\": [],\n \"related\": [\n \"06-mcp\"\n ],\n \"packIds\": [\n \"use-case/wire-mcp-agents\"\n ]\n },\n {\n \"id\": \"author-templates\",\n \"type\": \"use-case\",\n \"title\": \"Author and store templates\",\n \"summary\": \"Understand the template directory contract, built-ins, user store, and PPTX rules.\",\n \"aliases\": [],\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"tags\": [\n \"templates\",\n \"studio\"\n ],\n \"goals\": [\n \"Understand the template directory contract, built-ins, user store, and PPTX rules.\"\n ],\n \"path\": \"use-cases/author-templates.md\",\n \"webPath\": \"/use-cases#author-templates\",\n \"prerequisites\": [],\n \"related\": [\n \"07-templates\"\n ],\n \"packIds\": [\n \"use-case/author-templates\"\n ]\n },\n {\n \"id\": \"00-overview\",\n \"type\": \"book\",\n \"title\": \"Overview\",\n \"summary\": \"Surfaces, formats, and the render pipeline — where Markdown Reports Studio fits.\",\n \"aliases\": [\n \"CASE FILE · MDR-00\"\n ],\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"tags\": [\n \"platform\",\n \"start-here\",\n \"overview\"\n ],\n \"goals\": [],\n \"path\": \"books/00-overview/\",\n \"webPath\": \"/books/00-overview\",\n \"prerequisites\": [],\n \"related\": [],\n \"packIds\": []\n },\n {\n \"id\": \"01-packages\",\n \"type\": \"book\",\n \"title\": \"Packages\",\n \"summary\": \"Which npm package to install for SDK, CLI, API, client, MCP, types, and templates.\",\n \"aliases\": [\n \"CASE FILE · MDR-01\"\n ],\n \"audiences\": [\n \"developers\"\n ],\n \"tags\": [\n \"packages\",\n \"npm\"\n ],\n \"goals\": [],\n \"path\": \"books/01-packages/\",\n \"webPath\": \"/books/01-packages\",\n \"prerequisites\": [],\n \"related\": [],\n \"packIds\": []\n },\n {\n \"id\": \"02-getting-started\",\n \"type\": \"book\",\n \"title\": \"Getting Started\",\n \"summary\": \"CLI, SDK, HTTP API, or MCP — first successful PDF/DOCX/PPTX in minutes.\",\n \"aliases\": [\n \"CASE FILE · MDR-02\"\n ],\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"tags\": [\n \"getting-started\",\n \"quickstart\"\n ],\n \"goals\": [],\n \"path\": \"books/02-getting-started/\",\n \"webPath\": \"/books/02-getting-started\",\n \"prerequisites\": [],\n \"related\": [],\n \"packIds\": []\n },\n {\n \"id\": \"03-sdk\",\n \"type\": \"book\",\n \"title\": \"SDK\",\n \"summary\": \"In-process HTML/PDF/DOCX/PPTX render, TemplateStore, and create-from-image.\",\n \"aliases\": [\n \"CASE FILE · MDR-03\"\n ],\n \"audiences\": [\n \"developers\"\n ],\n \"tags\": [\n \"sdk\",\n \"node\",\n \"core\"\n ],\n \"goals\": [],\n \"path\": \"books/03-sdk/\",\n \"webPath\": \"/books/03-sdk\",\n \"prerequisites\": [],\n \"related\": [],\n \"packIds\": []\n },\n {\n \"id\": \"04-cli\",\n \"type\": \"book\",\n \"title\": \"CLI\",\n \"summary\": \"Render from the shell and manage templates with create-from-html / create-from-image.\",\n \"aliases\": [\n \"CASE FILE · MDR-04\"\n ],\n \"audiences\": [\n \"developers\"\n ],\n \"tags\": [\n \"cli\",\n \"shell\"\n ],\n \"goals\": [],\n \"path\": \"books/04-cli/\",\n \"webPath\": \"/books/04-cli\",\n \"prerequisites\": [],\n \"related\": [],\n \"packIds\": []\n },\n {\n \"id\": \"05-api\",\n \"type\": \"book\",\n \"title\": \"HTTP API\",\n \"summary\": \"Run mdreports-api and call it with curl or @x12i/mdreports-api-client.\",\n \"aliases\": [\n \"CASE FILE · MDR-05\"\n ],\n \"audiences\": [\n \"developers\"\n ],\n \"tags\": [\n \"api\",\n \"http\",\n \"client\"\n ],\n \"goals\": [],\n \"path\": \"books/05-api/\",\n \"webPath\": \"/books/05-api\",\n \"prerequisites\": [],\n \"related\": [],\n \"packIds\": []\n },\n {\n \"id\": \"06-mcp\",\n \"type\": \"book\",\n \"title\": \"MCP\",\n \"summary\": \"Wire @x12i/mdreports-mcp-server into Cursor or Claude for render and template tools.\",\n \"aliases\": [\n \"CASE FILE · MDR-06\"\n ],\n \"audiences\": [\n \"developers\"\n ],\n \"tags\": [\n \"mcp\",\n \"agents\"\n ],\n \"goals\": [],\n \"path\": \"books/06-mcp/\",\n \"webPath\": \"/books/06-mcp\",\n \"prerequisites\": [],\n \"related\": [],\n \"packIds\": []\n },\n {\n \"id\": \"07-templates\",\n \"type\": \"book\",\n \"title\": \"Templates\",\n \"summary\": \"Template directory contract, built-ins, user store, and PPTX slide rules.\",\n \"aliases\": [\n \"CASE FILE · MDR-07\"\n ],\n \"audiences\": [\n \"developers\",\n \"builders\"\n ],\n \"tags\": [\n \"templates\",\n \"html\",\n \"css\"\n ],\n \"goals\": [],\n \"path\": \"books/07-templates/\",\n \"webPath\": \"/books/07-templates\",\n \"prerequisites\": [],\n \"related\": [],\n \"packIds\": []\n }\n ]\n}",
928
+ "use-cases/author-templates.md": "# Author and store templates\n\n> **Use case id:** `author-templates`\n> **Goal:** Understand the template directory contract, built-ins, user store, and PPTX rules.\n> **Audiences:** developers, builders\n> **Tags:** templates, studio\n\n## Reading path\n\n1. **Templates** (builders) → chapters: `1-built-ins`, `2-layout-contract`, `3-user-templates`, `4-images-in-markdown`, `5-pptx`\n\n## From: Templates — 1. Built-ins\n\nStart here before inventing a new layout:\n\n| Id | Best for |\n| --- | --- |\n| `clean-report` | Multi-section reports |\n| `letter` | Short correspondence |\n| `technical-doc` | Technical documentation |\n\n---\n\n## From: Templates — 2. Layout contract\n\nA template folder is three files:\n\n| File | Role |\n| --- | --- |\n| `template.json` | Id, name, page/theme/DOCX/PPTX styles, meta slots |\n| `layout.html` | Shell with `</head>` and `<!--CONTENT-->` |\n| `styles.css` | Look-and-feel injected into the shell |\n\nKeep slot names stable; renderers fill them from Markdown and frontmatter.\n\n---\n\n## From: Templates — 3. User templates\n\nYour custom templates live under `~/.mdreports/templates` (or a path your team sets). Built-ins are never overwritten.\n\nCreate from:\n\n- Studio UI (HTML or design screenshot)\n- CLI `create-from-html` / `create-from-image`\n- Asking an agent via MCP when configured\n\nScreenshot drafts need an Anthropic API key.\n\n---\n\n## From: Templates — 4. Images in Markdown\n\nPrefer absolute HTTPS image URLs in source Markdown so HTML and PDF previews stay reliable.\n\n---\n\n## From: Templates — 5. PPTX\n\nSlides are landscape 16:9. Structure decks with `#` headings — one H1 per slide. Put deck title in YAML frontmatter `title` for an opening title slide.\n\n## Also see\n\n- **Templates** (`07-templates`) — Template directory contract, built-ins, user store, and PPTX slide rules.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
929
+ "use-cases/call-http-api.md": "# Run and call the HTTP API\n\n> **Use case id:** `call-http-api`\n> **Goal:** Start mdreports-api and render via curl or the typed client.\n> **Audiences:** developers\n> **Tags:** api, http\n\n## Reading path\n\n1. **HTTP API** (developers) → chapters: `1-run`, `2-call-with-curl`, `3-typed-client`, `4-route-summary`\n\n## From: HTTP API — 1. Run\n\n```bash\nnpm install -g @x12i/mdreports-api\nnpx playwright install chromium\nmdreports-api\n```\n\nOptional env:\n\n| Variable | Purpose |\n| --- | --- |\n| `MDREPORTS_API_PORT` / `PORT` | Listen port (default **6460**) |\n| `MDREPORTS_API_KEY` | If set, require `Authorization: Bearer <key>` (except `/health`) |\n| `MDREPORTS_TEMPLATES_DIR` | User templates directory |\n\n---\n\n## From: HTTP API — 2. Call with curl\n\n```bash\ncurl -s http://localhost:6460/health\n\ncurl -s http://localhost:6460/templates | jq .\n\ncurl -s -X POST http://localhost:6460/render/html \\\n -H 'content-type: application/json' \\\n -d '{\"markdown\":\"# Hello\",\"templateId\":\"clean-report\"}' | jq .\n\ncurl -s -X POST http://localhost:6460/render/pdf \\\n -H 'content-type: application/json' \\\n -d '{\"markdown\":\"# Hello\",\"templateId\":\"clean-report\"}' \\\n --output report.pdf\n\ncurl -s -X POST http://localhost:6460/render/pptx \\\n -H 'content-type: application/json' \\\n -d '{\"markdown\":\"# Hello\\n\\nSlide body\",\"templateId\":\"clean-report\"}' \\\n --output report.pptx\n```\n\n---\n\n## From: HTTP API — 3. Typed client\n\n```bash\nnpm install @x12i/mdreports-api-client\n```\n\n```ts\nimport { ApiClient } from \"@x12i/mdreports-api-client\";\n\nconst client = new ApiClient({\n baseUrl: \"http://localhost:6460\",\n apiKey: process.env.MDREPORTS_API_KEY\n});\n\nconst pdf = await client.renderPdf(\"# Hello\", \"clean-report\");\nconst templates = await client.listTemplates();\n```\n\n---\n\n## From: HTTP API — 4. Route summary\n\n| Method | Path | Description |\n| --- | --- |\n| `GET` | `/health` | Liveness (no auth) |\n| `GET` | `/templates` | List templates |\n| `GET` | `/templates/:id` | Get template |\n| `POST` | `/templates/from-html` | Create from HTML + CSS |\n| `POST` | `/templates/from-image` | Create from image (multipart) |\n| `PATCH` | `/templates/:id` | Update user template |\n| `DELETE` | `/templates/:id` | Delete user template |\n| `POST` | `/render/html` | Markdown → HTML JSON |\n| `POST` | `/render/pdf` | Markdown → PDF bytes |\n| `POST` | `/render/docx` | Markdown → DOCX bytes |\n| `POST` | `/render/pptx` | Markdown → PPTX bytes |\n\n## Also see\n\n- **HTTP API** (`05-api`) — Run mdreports-api and call it with curl or @x12i/mdreports-api-client.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
930
+ "use-cases/map-packages.md": "# Map the @x12i/mdreports-* packages\n\n> **Use case id:** `map-packages`\n> **Goal:** Know which npm package owns core, CLI, API, client, MCP, types, and templates.\n> **Audiences:** developers\n> **Tags:** packages, npm\n\n## Reading path\n\n1. **Packages** (developers) → chapters: `1-package-table`, `2-dependency-shape`, `3-naming-note`\n\n## From: Packages — 1. Package table\n\n| Package | When to install |\n| --- | --- |\n| `@x12i/mdreports-core` | In-process HTML/PDF/DOCX/PPTX + `TemplateStore` |\n| `@x12i/mdreports-cli` | Shell command `mdreports` |\n| `@x12i/mdreports-api` | Network service `mdreports-api` |\n| `@x12i/mdreports-api-client` | Typed `fetch` client for the HTTP API |\n| `@x12i/mdreports-mcp-server` | MCP tools over stdio |\n| `@x12i/mdreports-types` | Shared Zod schemas / TS types |\n| `@x12i/mdreports-templates` | Rarely — pulled in by core |\n\nNot published: `apps/playground`, `apps/studio` (run from this monorepo).\n\nKnowledge for agents/humans: `@x12i/mdreports-docs` (this library) — install as a **devDependency** only.\n\n---\n\n## From: Packages — 2. Dependency shape\n\n```\n@x12i/mdreports-types\n ↑\n@x12i/mdreports-templates ──→ @x12i/mdreports-core ──→ CLI / API / MCP\n ↓\n @x12i/mdreports-api-client (HTTP → API)\n```\n\nCore formats: **HTML**, **PDF**, **DOCX**, and landscape **PPTX** (H1 = new slide).\n\n---\n\n## From: Packages — 3. Naming note\n\nShort names like `@x12i/core` / `@x12i/cli` are already used by another x12i project on npm, so this product publishes under `@x12i/mdreports-*`.\n\n## Also see\n\n- **Packages** (`01-packages`) — Which npm package to install for SDK, CLI, API, client, MCP, types, and templates.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
931
+ "use-cases/orient-mdreports.md": "# Orient on Markdown Reports Studio\n\n> **Use case id:** `orient-mdreports`\n> **Goal:** Understand formats, surfaces, and the one render pipeline before installing anything.\n> **Audiences:** developers, builders\n> **Tags:** platform, start-here\n\n## Reading path\n\n1. **Overview** (developers) → chapters: `1-what-it-is`, `2-formats-and-surfaces`, `3-how-rendering-works`, `4-where-to-go-next`\n\n## From: Overview — 1. What it is\n\nTurn Markdown into styled **PDF**, **Word (DOCX)**, **PowerPoint (PPTX)**, and **HTML** using swappable templates.\n\n**Not** a CMS or collaborative editor — a render pipeline: Markdown in, branded document out.\n\nOne engine powers every surface: SDK, CLI, HTTP API, MCP server, Playground UI, and Studio UI.\n\n---\n\n## From: Overview — 2. Formats and surfaces\n\n| Capability | Details |\n| --- | --- |\n| Formats | HTML, PDF (Playwright Chromium), DOCX, PPTX (landscape 16:9) |\n| Templates | Built-ins (`clean-report`, `letter`, `technical-doc`) + your own |\n| Frontmatter | YAML (e.g. `title`) fills template slots |\n| Surfaces | SDK, CLI (`mdreports`), HTTP API, MCP, Playground (`:6461`), Studio (`:6463`) |\n\nAll published packages are public under `@x12i/mdreports-*` on npm.\n\nPDF needs Chromium once per machine: `npx playwright install chromium`. Requires **Node.js 20.11+**.\n\n---\n\n## From: Overview — 3. How rendering works\n\n1. **Parse** Markdown (including YAML frontmatter).\n2. **Load template** by id — built-in or user template from disk.\n3. **Inject** CSS into `layout.html` and fill slots (`<!--CONTENT-->`, `<!--TITLE-->`, meta slots).\n4. **Emit** HTML string, PDF via pooled Chromium, DOCX/PPTX from the Markdown AST.\n\nAlways call `shutdown()` in SDK/long-lived processes so the browser exits cleanly.\n\n### Known limitations\n\n- **HTML/PDF images**: absolute `http(s)` URLs or data URIs only.\n- **DOCX / PPTX images**: local paths and URLs are best-effort; failures become `[image: alt]`.\n- **DOCX / PPTX code blocks**: monospace + shading — no syntax highlighting.\n- **PPTX overflow**: long content under a single H1 is not auto-split (may clip).\n- **Raw HTML in Markdown**: kept for HTML/PDF; dropped for DOCX and PPTX.\n\n---\n\n## From: Overview — 4. Where to go next\n\n| Goal | Book / use case |\n| --- | --- |\n| First successful file | Getting Started · `pick-a-surface` |\n| Which package to install | Packages · `map-packages` |\n| Custom look | Templates · `author-templates` |\n| Agent tools | MCP · `wire-mcp-agents` |\n\n## Also see\n\n- **Overview** (`00-overview`) — Surfaces, formats, and the render pipeline — where Markdown Reports Studio fits.\n- **Getting Started** (`02-getting-started`) — CLI, SDK, HTTP API, or MCP — first successful PDF/DOCX/PPTX in minutes.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
932
+ "use-cases/pick-a-surface.md": "# Pick a surface and first render\n\n> **Use case id:** `pick-a-surface`\n> **Goal:** Choose CLI, SDK, API, or MCP and produce a first PDF/DOCX/PPTX.\n> **Audiences:** developers, builders\n> **Tags:** getting-started, quickstart\n\n## Reading path\n\n1. **Getting Started** (developers) → chapters: `1-prerequisites`, `2-option-a-cli`, `3-option-b-sdk`, `4-option-c-http-api`, `5-option-d-mcp`, `6-built-in-templates`\n\n## From: Getting Started — 1. Prerequisites\n\n- Node.js **20.11+**\n- Chromium for PDF: `npx playwright install chromium`\n\n---\n\n## From: Getting Started — 2. Option A — CLI\n\n```bash\nnpm install -g @x12i/mdreports-cli\nnpx playwright install chromium\n\nmdreports templates list\nmdreports render --in report.md --template clean-report --format pdf --out report.pdf\nmdreports render --in report.md --template clean-report --format pptx --out report.pptx\n```\n\n---\n\n## From: Getting Started — 3. Option B — SDK\n\n```bash\nnpm install @x12i/mdreports-core\nnpx playwright install chromium\n```\n\n```ts\nimport { renderToPdf, renderToPptx, shutdown } from \"@x12i/mdreports-core\";\nimport { writeFile } from \"node:fs/promises\";\n\nconst pdf = await renderToPdf(\"# Hello\\n\\nWorld\", \"clean-report\");\nawait writeFile(\"report.pdf\", pdf);\n\nconst pptx = await renderToPptx(\"# Hello\\n\\nWorld\", \"clean-report\");\nawait writeFile(\"report.pptx\", pptx);\nawait shutdown();\n```\n\n---\n\n## From: Getting Started — 4. Option C — HTTP API\n\n```bash\nnpm install -g @x12i/mdreports-api\nnpx playwright install chromium\nmdreports-api # http://localhost:6460\n```\n\n```ts\nimport { ApiClient } from \"@x12i/mdreports-api-client\";\n\nconst client = new ApiClient({ baseUrl: \"http://localhost:6460\" });\nconst pdf = await client.renderPdf(\"# Hello\", \"clean-report\");\n```\n\n---\n\n## From: Getting Started — 5. Option D — MCP\n\n```json\n{\n \"mcpServers\": {\n \"mdreports\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@x12i/mdreports-mcp-server\"]\n }\n }\n}\n```\n\n---\n\n## From: Getting Started — 6. Built-in templates\n\n- `clean-report` — multi-section reports\n- `letter` — short correspondence\n- `technical-doc` — technical documentation\n\nCreate your own with CLI `templates create-from-html` / `create-from-image`, the SDK, or Studio.\n\n## Also see\n\n- **Packages** (`01-packages`) — Which npm package to install for SDK, CLI, API, client, MCP, types, and templates.\n- **Getting Started** (`02-getting-started`) — CLI, SDK, HTTP API, or MCP — first successful PDF/DOCX/PPTX in minutes.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
933
+ "use-cases/render-with-cli.md": "# Render from the CLI\n\n> **Use case id:** `render-with-cli`\n> **Goal:** Use mdreports render and templates commands from the shell.\n> **Audiences:** developers\n> **Tags:** cli\n\n## Reading path\n\n1. **CLI** (developers) → chapters: `1-install`, `2-render`, `3-templates`\n\n## From: CLI — 1. Install\n\n```bash\nnpm install -g @x12i/mdreports-cli\nnpx playwright install chromium\n```\n\nBinary name: `mdreports`.\n\n---\n\n## From: CLI — 2. Render\n\n```bash\nmdreports render --in report.md --template clean-report --format pdf --out report.pdf\nmdreports render --in report.md --template letter --format docx\nmdreports render --in report.md --template clean-report --format pptx\nmdreports render --in report.md --template technical-doc --format html\n```\n\n---\n\n## From: CLI — 3. Templates\n\n```bash\nmdreports templates list\nmdreports templates list --json\nmdreports templates show clean-report\nmdreports templates create-from-html --id my-layout --name \"My Layout\" \\\n --layout layout.html --styles styles.css\nmdreports templates create-from-image --id from-shot --name \"From Shot\" \\\n --image design.png\nmdreports templates delete my-layout\n```\n\n`--templates-dir` overrides the user templates directory on any command.\n\n## Also see\n\n- **CLI** (`04-cli`) — Render from the shell and manage templates with create-from-html / create-from-image.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
934
+ "use-cases/render-with-sdk.md": "# Render in-process with the SDK\n\n> **Use case id:** `render-with-sdk`\n> **Goal:** Call renderToHtml/Pdf/Docx/Pptx, shut down Chromium, and use TemplateStore.\n> **Audiences:** developers\n> **Tags:** sdk, core\n\n## Reading path\n\n1. **SDK** (developers) → chapters: `1-install`, `2-render`, `3-template-store`, `4-ai-template-from-image`\n\n## From: SDK — 1. Install\n\n```bash\nnpm install @x12i/mdreports-core\nnpx playwright install chromium\n```\n\n---\n\n## From: SDK — 2. Render\n\n```ts\nimport { renderToHtml, renderToPdf, renderToDocx, renderToPptx, shutdown } from \"@x12i/mdreports-core\";\n\nconst md = `---\ntitle: Q1 Report\n---\n\n# Summary\n\nBody here.\n`;\n\nconst { html, title } = await renderToHtml(md, \"clean-report\");\nconst pdf = await renderToPdf(md, \"clean-report\", {\n pdf: { format: \"Letter\", landscape: false }\n});\nconst docx = await renderToDocx(md, \"technical-doc\");\nconst pptx = await renderToPptx(md, \"clean-report\"); // landscape 16:9; each H1 = new slide\n\nawait shutdown();\n```\n\nAlways call `shutdown()` when your process is done (or on SIGTERM in long-lived servers) so Playwright exits cleanly.\n\n---\n\n## From: SDK — 3. Template store\n\n```ts\nimport { TemplateStore } from \"@x12i/mdreports-core\";\n\nconst store = new TemplateStore({\n templatesDir: \"./my-templates\" // optional; else MDREPORTS_TEMPLATES_DIR or ~/.mdreports/templates\n});\n\nconst all = await store.list();\nconst one = await store.get(\"clean-report\");\n\nawait store.createFromHtml({\n id: \"brand-report\",\n name: \"Brand Report\",\n layoutHtml: \"<!doctype html><html><head></head><body><main><!--CONTENT--></main></body></html>\",\n stylesCss: \"main { max-width: 720px; margin: 0 auto; }\"\n});\n\nawait store.update(\"brand-report\", { name: \"Brand Report v2\" });\nawait store.delete(\"brand-report\");\n```\n\nBuilt-in templates cannot be updated or deleted.\n\n---\n\n## From: SDK — 4. AI template from image\n\n```ts\nimport { readFile } from \"node:fs/promises\";\nimport { createTemplateFromImage, shutdown } from \"@x12i/mdreports-core\";\n\nconst imageBuffer = await readFile(\"design.png\");\nawait createTemplateFromImage({\n id: \"from-design\",\n name: \"From Design\",\n imageBuffer,\n imageMediaType: \"image/png\",\n anthropicApiKey: process.env.ANTHROPIC_API_KEY!\n});\nawait shutdown();\n```\n\n## Also see\n\n- **SDK** (`03-sdk`) — In-process HTML/PDF/DOCX/PPTX render, TemplateStore, and create-from-image.\n- **Templates** (`07-templates`) — Template directory contract, built-ins, user store, and PPTX slide rules.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
935
+ "use-cases/wire-mcp-agents.md": "# Wire MCP tools for agents\n\n> **Use case id:** `wire-mcp-agents`\n> **Goal:** Install the MCP server and expose render/template tools to Cursor or Claude.\n> **Audiences:** developers\n> **Tags:** mcp, agents\n\n## Reading path\n\n1. **MCP** (developers) → chapters: `1-run-configure`, `2-tools`\n\n## From: MCP — 1. Run configure\n\n```bash\nnpm install -g @x12i/mdreports-mcp-server\nnpx playwright install chromium\n```\n\nExample MCP client config:\n\n```json\n{\n \"mcpServers\": {\n \"mdreports\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@x12i/mdreports-mcp-server\"],\n \"env\": {\n \"ANTHROPIC_API_KEY\": \"optional\"\n }\n }\n }\n}\n```\n\nOptional: `MDREPORTS_TEMPLATES_DIR` for the user template store.\n\n---\n\n## From: MCP — 2. Tools\n\n- `list_templates` / `get_template`\n- `render_markdown_to_html` (returns HTML inline)\n- `render_markdown_to_pdf` / `render_markdown_to_docx` / `render_markdown_to_pptx` (write a file; optional `outPath`)\n- `create_template_from_html` / `create_template_from_image` / `delete_template`\n\nPPTX is always landscape 16:9; each `#` heading starts a new slide.\n\n## Also see\n\n- **MCP** (`06-mcp`) — Wire @x12i/mdreports-mcp-server into Cursor or Claude for render and template tools.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n"
936
+ };
937
+ //# sourceMappingURL=bundle.js.map