@rubytech/create-maxy 1.0.462 → 1.0.463

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.
package/dist/index.js CHANGED
@@ -567,6 +567,10 @@ function deployPayload() {
567
567
  cpSync(liveAccountsDir, persistentAccountsDir, { recursive: true, force: true });
568
568
  console.log(" Backed up account data.");
569
569
  }
570
+ // Stop the running service before wiping directories (upgrade path).
571
+ // The server holds open files in platform/ — rmSync fails with ENOTEMPTY if it's running.
572
+ const svcName = BRAND.serviceName.replace(".service", "");
573
+ spawnSync("systemctl", ["--user", "stop", svcName], { stdio: "pipe" });
570
574
  // Wipe old platform/maxy/premium-plugins to prevent stale files
571
575
  // The UI server directory in the payload is always named "maxy" regardless of brand
572
576
  for (const dir of ["platform", "maxy", "premium-plugins", "docs", ".claude"]) {
@@ -598,9 +602,6 @@ function deployPayload() {
598
602
  }
599
603
  function buildPlatform() {
600
604
  log("8", TOTAL, "Installing dependencies and building...");
601
- // Stop the running service before rebuilding (upgrade path)
602
- const svcName = BRAND.serviceName.replace(".service", "");
603
- spawnSync("systemctl", ["--user", "stop", svcName], { stdio: "pipe" });
604
605
  console.log(` Installing platform dependencies (${join(INSTALL_DIR, "platform")})...`);
605
606
  shellRetry("npm", ["install", ...NPM_NET_FLAGS], { cwd: join(INSTALL_DIR, "platform") }, 3, 15);
606
607
  // MCP server dist/ files are pre-compiled in the payload — no build step needed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/create-maxy",
3
- "version": "1.0.462",
3
+ "version": "1.0.463",
4
4
  "description": "Install Maxy — AI for Productive People",
5
5
  "bin": {
6
6
  "create-maxy": "./dist/index.js"
@@ -41,6 +41,7 @@ Tools are available via the `admin` MCP server.
41
41
  | Manage access grants | Admin asks to invite visitors, revoke or extend access, list who has access, or set an agent's access mode | `skills/access-manager/SKILL.md` |
42
42
  | Manage plugins and settings | User asks to install, enable, disable, or configure plugins, or change account settings | `skills/plugin-management/skill.md` |
43
43
  | Manage specialists | User asks to install or remove a specialist subagent, or activate/deactivate premium plugin agents | `skills/specialist-management/skill.md` |
44
+ | Generate print-quality PDF | User asks to create a PDF document, one-pager, brochure, or any HTML intended for print/download | `skills/a4-print-documents/SKILL.md` |
44
45
 
45
46
  ## Hooks
46
47
 
@@ -0,0 +1,241 @@
1
+ ---
2
+ name: a4-print-documents
3
+ description: >
4
+ Constraints for producing print-quality A4 HTML documents intended for PDF output
5
+ via browser_pdf_save. Use when creating or modifying any HTML document that will be
6
+ saved as PDF, uses A4 page dimensions, or contains glassmorphism/backdrop-filter effects
7
+ that must survive print. Trigger phrases: "PDF", "print to PDF", "download PDF",
8
+ "one-pager", "A4", "brochure", "executive document", "market analysis", or any request
9
+ to generate a document for print or download.
10
+ ---
11
+
12
+ # A4 Print-Ready HTML Documents
13
+
14
+ Constraints for producing HTML documents that render correctly when saved as PDF via the browser-specialist's `browser_pdf_save` tool. Every rule exists because violating it caused a visible problem in production documents.
15
+
16
+ ## Rendering path
17
+
18
+ Generate the HTML document, then delegate to the browser-specialist to save it as PDF using `browser_pdf_save`. The browser-specialist controls Playwright — you compose the delegation brief describing what to render and any pre-render steps (like glassmorphism screenshot capture).
19
+
20
+ ## Glassmorphism does not survive print
21
+
22
+ `backdrop-filter: blur()`, CSS glassmorphism, and layered transparency effects render as flat, transparent boxes in browser print/PDF output. This is a browser limitation, not a CSS error.
23
+
24
+ **Required pattern:** Every section using glassmorphism needs a pre-rendered PNG fallback that is hidden on screen and shown only in print.
25
+
26
+ ```css
27
+ .cover-print-img { display: none; }
28
+
29
+ @media print {
30
+ .cover > *:not(.cover-print-img) { display: none !important; }
31
+ .cover-print-img {
32
+ display: block !important;
33
+ position: absolute;
34
+ inset: 0;
35
+ width: 100%;
36
+ height: 100%;
37
+ object-fit: cover;
38
+ }
39
+ }
40
+ ```
41
+
42
+ ```html
43
+ <div class="cover">
44
+ <img class="cover-print-img" src="cover-print.png" alt="">
45
+ <!-- live glassmorphism content follows -->
46
+ </div>
47
+ ```
48
+
49
+ This pattern applies to every full-bleed glassmorphism section (cover pages, back pages).
50
+
51
+ ### Capturing the print image
52
+
53
+ Each glassmorphism section needs its own screenshot — you cannot reuse a print image from a different document or a differently-sized section.
54
+
55
+ Delegate to the browser-specialist with a brief that includes:
56
+
57
+ 1. **Serve the HTML over HTTP** — `file://` protocol is blocked by Playwright. The specialist should start a local server.
58
+ 2. **Set the viewport** to match the element's rendered size. Measure the element's bounding box first, then resize the viewport to `Math.ceil(width) + 1` by `Math.ceil(height) + 1` to eliminate scrollbars.
59
+ 3. **Hide UI chrome** (download buttons, navigation overlays) and set `document.body.style.overflow = 'hidden'` to suppress body-level scrollbars.
60
+ 4. **Screenshot the specific element** (e.g. `.cover`, `.backpage`) using element-level screenshot — not a full-page or viewport screenshot.
61
+ 5. **Save the PNG** alongside the HTML, named for the section it replaces (e.g. `cover-print.png`, `backpage-print.png`).
62
+ 6. **Restore** hidden elements and overflow after capture.
63
+ 7. **Verify** the saved PNG visually — confirm no scrollbars, no UI chrome, correct dimensions.
64
+
65
+ After capturing all print images, delegate a second task to save the final PDF via `browser_pdf_save`.
66
+
67
+ ## Page margins, page numbers, and running footers
68
+
69
+ Use `@page` margin boxes for page numbers and running footers — not `position: fixed` elements.
70
+
71
+ ```css
72
+ @page {
73
+ margin: 0.6in 0.7in 0.8in;
74
+ @bottom-center {
75
+ content: counter(page);
76
+ font-family: 'Playfair Display', Georgia, serif;
77
+ font-size: 9pt;
78
+ color: #8A8A84;
79
+ }
80
+ }
81
+
82
+ /* Cover page: zero margins, no page number */
83
+ @page :first {
84
+ margin: 0;
85
+ @bottom-center { content: none; }
86
+ }
87
+
88
+ /* Named page for full-bleed back page */
89
+ @page backpage-full {
90
+ margin: 0;
91
+ @bottom-center { content: none; }
92
+ }
93
+ ```
94
+
95
+ Then in `@media print`, the cover needs NO `page:` property — `@page :first` handles it. Only the backpage needs the named page assignment:
96
+
97
+ ```css
98
+ @media print {
99
+ .cover {
100
+ width: auto; margin: 0; box-shadow: none; /* reset screen-only properties */
101
+ min-height: 0;
102
+ height: 100vh;
103
+ page-break-after: always;
104
+ position: relative;
105
+ overflow: hidden;
106
+ }
107
+ .backpage {
108
+ width: auto; margin: 0; box-shadow: none; /* reset screen-only properties */
109
+ min-height: 0;
110
+ height: 100vh;
111
+ page-break-before: always;
112
+ position: relative;
113
+ overflow: hidden;
114
+ page: backpage-full;
115
+ }
116
+ }
117
+ ```
118
+
119
+ **Key details:**
120
+ - `@page :first` zeros the margins for the cover — no named page needed on the cover element.
121
+ - Named pages are only needed for non-first full-bleed pages (backpage).
122
+ - `counter(page)` gives automatic page numbering with no JavaScript.
123
+ - No `position: fixed` hacks are needed for repeating headers/footers.
124
+ - If the screen CSS uses `width: 210mm; margin: 20px auto; box-shadow: ...` on the cover/backpage (for the card-on-grey-background look), the print CSS MUST explicitly reset these: `width: auto; margin: 0; box-shadow: none;`. Screen-only layout properties leak into print if not reset. Do NOT use `width: 100vw` or `margin: 0 !important` — just `width: auto; margin: 0`.
125
+ - The print image uses `position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;`.
126
+
127
+ ## A4 layout — continuous flow, not fixed-height boxes
128
+
129
+ Forcing each section into a fixed `height: 297mm` div creates large whitespace gaps when content doesn't fill a full page.
130
+
131
+ **Correct approach:**
132
+
133
+ - **Cover page:** `min-height: 100vh` on screen; `height: 100vh; page-break-after: always;` in print.
134
+ - **Content:** Flows naturally. The `@page` margins handle spacing. No fixed-height containers.
135
+ - Use `page-break-inside: avoid` on logical units (cards, tables, callouts, stat groups, timeline items, competitor cards, pullquotes).
136
+ - Use `page-break-before: always` on major section dividers (part breaks).
137
+ - Use `page-break-after: avoid` on headings and section numbers so they don't strand at the bottom of a page.
138
+ - Set `orphans: 3; widows: 3;` on paragraphs to prevent single-line stragglers.
139
+
140
+ ## Dark backgrounds are stripped in print
141
+
142
+ Browsers strip background colours by default when printing.
143
+
144
+ **Required:** Add both properties to every dark element in `@media print`:
145
+
146
+ ```css
147
+ @media print {
148
+ .dark-element {
149
+ -webkit-print-color-adjust: exact;
150
+ print-color-adjust: exact;
151
+ }
152
+ }
153
+ ```
154
+
155
+ ## Stripping glassmorphism from content areas
156
+
157
+ In multi-page documents, strip `backdrop-filter` from content sections (where it won't render correctly anyway) while preserving it on cover/backpage elements that are replaced with print images:
158
+
159
+ ```css
160
+ @media print {
161
+ /* Strip glass from content */
162
+ .content *, .content *::before, .content *::after {
163
+ backdrop-filter: none !important;
164
+ -webkit-backdrop-filter: none !important;
165
+ border-radius: 0 !important;
166
+ box-shadow: none !important;
167
+ }
168
+ }
169
+ ```
170
+
171
+ ## Document structure pattern
172
+
173
+ Multi-page documents follow this structure:
174
+
175
+ 1. **Cover** — full-bleed, glassmorphism, with print image fallback. Uses `@page :first { margin: 0; }` — NO named page on the element. `page-break-after: always`.
176
+ 2. **Table of contents** (optional) — `page-break-after: always` to start content on a fresh page.
177
+ 3. **Content sections** — flowing, with part dividers using `page-break-before: always`.
178
+ 4. **Back page** — full-bleed CTA/contact page. **Not** an inline footer div — a separate top-level element outside `.body-wrap` with its own named page, print image fallback, and `page-break-before: always`.
179
+
180
+ **The back page is mandatory for multi-page documents.** An inline CTA footer (a `div` inside flowing content) ends up floating mid-page with whitespace below it. The back page pattern guarantees a clean final page.
181
+
182
+ ```css
183
+ @page backpage-full {
184
+ margin: 0;
185
+ @bottom-center { content: none; }
186
+ }
187
+
188
+ @media print {
189
+ .backpage {
190
+ page: backpage-full;
191
+ min-height: 0; height: 100vh;
192
+ page-break-before: always;
193
+ position: relative; overflow: hidden;
194
+ }
195
+ .backpage > *:not(.backpage-print-img) { display: none !important; }
196
+ .backpage-print-img {
197
+ display: block !important;
198
+ position: absolute;
199
+ inset: 0;
200
+ width: 100%; height: 100%;
201
+ object-fit: cover;
202
+ }
203
+ }
204
+ ```
205
+
206
+ ```html
207
+ <!-- Outside .body-wrap, after it closes -->
208
+ <div class="backpage">
209
+ <img class="backpage-print-img" src="backpage-print.png" alt="" style="display:none;">
210
+ <!-- live backpage content (bg, text, contact info) -->
211
+ </div>
212
+ ```
213
+
214
+ The backpage print image is captured via the same browser-specialist delegation process as the cover — element-level screenshot with UI chrome hidden.
215
+
216
+ ## Single-page documents
217
+
218
+ For single A4 documents (one-pagers), use fixed dimensions:
219
+
220
+ ```css
221
+ .page {
222
+ width: 210mm;
223
+ min-height: 297mm;
224
+ margin: 0 auto;
225
+ overflow: hidden;
226
+ }
227
+
228
+ @page { size: A4; margin: 0; }
229
+
230
+ @media print {
231
+ .page {
232
+ width: 210mm;
233
+ height: 297mm;
234
+ page-break-after: always;
235
+ }
236
+ }
237
+ ```
238
+
239
+ ## Document background for multi-page screen viewing
240
+
241
+ Multi-page documents use a neutral body background (e.g. `body { background: var(--background); }`) on screen. In `@media print`, reset to `body { background: white; }`.
@@ -31,6 +31,7 @@ Conversation is the only interface. Type what you need:
31
31
  - "Schedule a call with Sarah for Thursday at 2pm"
32
32
  - "What did I last discuss with Tom?"
33
33
  - "Send a Telegram message to the team: standup in 10 minutes"
34
+ - "Create a one-pager PDF about our new product launch"
34
35
 
35
36
  Maxy understands plain language. You don't need to learn commands or navigate menus.
36
37