{"id":48217,"plugin_id":"plugins_6ac2a42e25188191bebbf938f9823fb3","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-10-24T13:35:42.970Z","digest":"60fc63594153b01cef01f37a3bb520f85671f9bfa01867b3375a4da049326457","against":null,"payload":{"description":"Turns a computed finance result into one self-contained HTML page. The page can hold a title, a summary, figure tiles, a bridge, line and bar charts, tables and a switch between views. It uses inline CSS and SVG, makes no network requests, and reads well at phone width in light and dark mode. Use when the person wants a result as a web page, an HTML one-pager, something to open in a browser, email or share, a dashboard-style summary, or /magnos:page. Not for computing the figures; run variance, board-pack or another skill first.","included_files":[{"relative_path":"references/spec.md","size_in_bytes":6845},{"relative_path":"references/working-rules.md","size_in_bytes":3212},{"relative_path":"scripts/magnos_fin.py","size_in_bytes":51585},{"relative_path":"scripts/page.py","size_in_bytes":42045}],"name":"page","skill_md_contents":"---\nname: page\ndescription: Turns a computed finance result into one self-contained HTML page. The page can hold a title, a summary, figure tiles, a bridge, line and bar charts, tables and a switch between views. It uses inline CSS and SVG, makes no network requests, and reads well at phone width in light and dark mode. Use when the person wants a result as a web page, an HTML one-pager, something to open in a browser, email or share, a dashboard-style summary, or /magnos:page. Not for computing the figures; run variance, board-pack or another skill first.\n---\n\n# Page\n\nGiven a result that a script already computed, produce one HTML file the person can open offline, email and click through.\n\n> Ground rules: `references/working-rules.md`. Spec text is shown as text: the renderer escapes it.\n\n## Inputs\n\n- **A page spec (JSON).** If the board-pack skill ran, `board_pack_<mon>_page.json` is a finished spec: use it as it is, or edit only its text.\n- **Otherwise, a computed result** to build the spec from: a result in `.magnos/runs/`, a skill's printed tables, or the calculator (`python3 scripts/magnos_fin.py calc`).\n\n## Workflow\n\n1. Write the spec as a JSON file in the working folder. The full format is in `references/spec.md`; read it before the first spec in a session. A minimal spec:\n\n   ```json\n   {\n     \"title\": \"September close: EBITDA up $28K on August\",\n     \"eyebrow\": \"Harbor & Pine\",\n     \"summary\": \"Revenue rose $80K to $4.95M. ...\",\n     \"tiles\": [{\"label\": \"Revenue\", \"value\": \"$4.95M\", \"change\": \"+1.6%\", \"direction\": \"up\"}],\n     \"blocks\": [\n       {\"type\": \"bridge\", \"title\": \"EBITDA, August to September\", \"subtitle\": \"$K\",\n        \"bars\": [{\"label\": \"Aug\", \"value\": 762, \"total\": true}, {\"label\": \"Revenue\", \"value\": 80},\n                 {\"label\": \"Cost of revenue\", \"value\": -40}, {\"label\": \"Operating expenses\", \"value\": -12},\n                 {\"label\": \"Sep\", \"value\": 790, \"total\": true}]},\n       {\"type\": \"table\", \"title\": \"What moved\", \"columns\": [\"$K\", \"Aug\", \"Sep\"], \"rows\": [[\"Revenue\", \"4,870\", \"4,950\"]]}\n     ],\n     \"footer\": \"Made by the magnos page skill from pnl_monthly.csv · Oct 4, 2026\"\n   }\n   ```\n\n   - Tiles and table cells take display text exactly as a script printed it.\n   - Chart values are plain numbers in the unit named in the block's subtitle.\n   - `views` (each with a label and its own summary, tiles and blocks) adds a switch, such as \"vs August\" and \"vs budget\".\n   - Write the title and summary in Finance plain.\n\n2. Render it:\n\n   ```bash\n   python3 scripts/page.py <spec.json>                          # writes <spec>.html in the working folder\n   python3 scripts/page.py <spec.json> --out september.html --open\n   ```\n\n   `--open` opens the page in the default browser. The script validates the spec and stops with one sentence when something is wrong, for example a bridge whose steps do not add up to its end total. Fix the spec from the result that produced it. Never adjust a bar to make a bridge tie.\n\n3. Show the file where the host can show HTML (a preview, an artifact, a code-block preview). Otherwise give the path.\n\n## Output\n\n- One sentence with the file name and the page title.\n- One line on what it holds: views, tiles, charts and tables.\n- One line saying it makes no network requests, so it works offline and as an email attachment.\n\nQuote no figure that is not in the spec.\n\n## Rules\n\n- Every figure in the spec comes from a script's output or the calculator. A page looks authoritative, so an untraced figure on it does more harm.\n\n## Gotchas\n\n- Axis tick labels are scale marks that the renderer picks. Every value label, tile and table cell comes from the spec.\n- The page follows the reader's light or dark setting and switches to a narrow layout at phone width. A Content-Security-Policy in the page blocks every request.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}