plugins/memorylane/skills/report-new/SKILL.md
(new) Turn a process analysis into a polished, client-ready report, first an HTML deck you review, then a matching PDF. Use to package an analysis into an exec report or PDF. Shows the deck for approval before making the PDF, and never makes up numbers.
npx skillsauth add deusXmachina-dev/memorylane report-newInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Turns a process-mining ledger (where time goes, repeated processes, automation, savings, all basis-labelled) into the deliverable an exec says "YES" to: a clean, visual, defensible HTML + PDF. The ledger is the input; this skill renders and persuades. Runs independently of any analysis skill: if input is missing, it asks.
Two hard requirements:
assets/components.html). Less prose, more structure.
Recommendations are hyper-specific to this customer: their actual tools,
the concrete mechanism, the human remainder. Never invent a number, app, tool
or step not in the ledger.Never fabricate. Always nudge. Any missing key input (a ledger, a bound field, a role/department label, client name, logo, cost rate) → STOP and ask in one batched question. Never invent identity, numbers, roles, tools, or steps to fill a gap or smooth a layout. This overrides speed and overrides every default below.
HTML first. PDF only after the user approves (mandatory stop). The user
ALWAYS reviews the HTML deck before any PDF exists. Render report.html, show
it, then STOP and wait for explicit approval ("yes" / "approved" / "ship it").
Never generate the HTML and the PDF in the same turn; never jump to a PDF or a
*-final.* file unprompted. The ONLY PDF allowed before approval is the
throwaway /tmp overflow probe in stage 5 (internal QA, never presented as the
deliverable). If you have not received approval in this conversation, end your
turn after the review step (stage 6). This overrides speed.
Source: one or more process-analysis*.json ledgers in the working dir (+
optional .md for wording). Each ledger is one observed person (the analysis
is single-user by construction). Any producer of the same shape works.
process-analysis*.json (and any paths the user
gives). 1 file → single-user report. 2+ → consolidated report (§7 stage 2).meta.role (and ideally department) for grouping. If
a ledger lacks a role label, ask which role/department it belongs to;
never guess.Expected ledger shape (top-level keys + the leaves the report binds; omit any element whose field is absent, per §2):
meta: role, location, window, active_days, measurement_scope, cost_basis
(rate, derivation, basis), shown_caveat; optional report_title, client.exec_rollup: repetitive_hours_per_week, automatable_pct, hours_saved_per_year,
dollars_saved_per_year, fte_capacity, overall_confidence{grade,why}, shown_caveat.
Headline figures = {low,base,high,basis}.baseline: total_active_hours, active_days, app_time_share[]{app,pct,hours},
deep_work_share.processes[]: name, category, role_department, frequency, time_per_instance,
common_path{description,approx_coverage_pct}, steps[]{action,app,input,output,
time_min,pain,automatable,basis}, automation{verdict,work_nature,mechanism,
feasibility,tool,automatable_fraction,human_remainder,automation_cost},
scores{impact_hours,automatability,effort,priority_rank}, confidence{grade},
savings{annual_hours_saved,gross/net dollars,payback_months,dominant_uncertainty}.systems_landscape[], reasoning_log[](+counts), assumptions[],
what_would_sharpen[], narrative_summary, review{reproducibility_note}.assets/components.html shows the exact field→page binding on sample data.
Intake gate. Ask ONCE in a single batched AskUserQuestion for everything
missing. Cosmetic fields take a default on skip; data-affecting gaps are never
invented (per the rule above): label them missing/estimated or omit:
The ledger labels every exec number seen / reasoned / estimated with a
shown_caveat and a reasoning log. Surface them, or this becomes slop:
seen green ·
reasoned blue · estimated amber) or the inline .basis micro-label. No
bare numbers.shown_caveat near the headlines (cover note + exec summary).Number + money formatting (house style, from shipped reports; currency follows the ledger, A$ shown as the example).
1h/week (2%) (no space inside 1h, one space before the
parenthesis). Shipped: 1h/week (2%), 3h/week (8%), 4h/week (5%), ~1 FTE (5%).~ and full digits with a comma
(~A$6,200, ~A$3,500, ~A$500, total ~A$15,000); exec KPI tiles and the
measured/total rows are the rounded grain with NO ~ (A$4k, A$11k, A$15k,
A$100k+); the headline reads save A$100k (no ~, no +). ~ is used ONLY on
per-process dollars, the in-scope total, and the illustrative figures (~A$100k+,
~1 FTE, ~15% of a workday), never on exec/measured rows or the headline.Data-confidence banner (read the thinness, say it). Compute a tier from the
ledger's coverage (total active hours, active days, #people, window) and show it
as a one-line .databanner near the headlines (cover + exec); fold it into the
scope line too. Tiers and voice:
estimated, and lead with the
single most reasonable extrapolation + the one action, not a hedge.Voice, no essays. Short, plain, compelling. Fragments and bullets over
paragraphs; label, number, basis, done. The only running prose is the ledger's
narrative_summary (<100 words) and the conclusion. State data thinness in ONE
line (the banner), never a wall of caveats. Friendly and direct: "little data,
here's the read, here's the reasonable extrapolation, here's the one move."
In assets/ beside this file:
report.css — full design system + print rules. Inline it into a
<style> tag. The whole report is one self-contained HTML file: CSS
inlined, charts as inline SVG/CSS, images as data URIs, no external links,
no CDN, no JS. This is what makes the PDF portable and faithful.components.html — rendered reference gallery of every section archetype
on sample data. Clone these blocks, bind real values, match the look.render-pdf.mjs + make-pdf.sh — the PDF pipeline (§7–8).Brand tokens live in the CSS (do not re-pick): --accent warm amber, --panel
deep ink-navy (cover + bands), Inter sans / Geist mono, near-white body.
App/tool logos. Every app named in a process renders its real logo from a maintained icon map (data-URI'd, never linked); for a tool with no logo file, inline a small SVG glyph. Never show a generic globe placeholder in the final deck, and flag any missing icon at verify rather than substituting one.
Tables. Span the full page width with balanced colgroups. Right-align numeric and money columns to the column edge; center small metric columns; never leave left-hugging gaps in wide columns.
The report carries the client's identity, like a consulting deliverable.
curl -L -o /tmp/logo.<ext> "<url>"; then encode to a data URI
(base64 -i /tmp/logo.png → data:image/png;base64,…). SVG can be inlined or
data-URI'd. Use <img src="data:…"> so it survives into the PDF..cover__client lockup ("Prepared for" + logo),
logo max-height:44px, aspect preserved.<img class="foot-logo"> (height:14px) + the company
name in the footer text. The CSS caps both dimensions; keep aspect ratio for
wide and square logos alike..plain if the logo is already light. The footer is light,
so a light/white logo there needs a dark plate, add one.Per-app icons (time-by-application appendix), and the acquisition gotchas we hit shipping:
data:image/png;base64,…, brand SVG →
data:image/svg+xml;base64,…. Size each at
width:20px;height:20px;border-radius:4px;object-fit:contain.favicon.ico is sometimes actually a PNG (one client's was a 231×231
PNG named .ico). Detect with file, convert/rename with sips before use.cdn.simpleicons.org can return 0 bytes; fall back to jsdelivr
(cdn.jsdelivr.net/npm/simple-icons@<v>/icons/<name>.svg).fill before inlining
(e.g. Slack #4A154B, OpenAI/ChatGPT #10A37F).#9B9690), never
a brand logo.The report is a stack of .page elements; each is exactly one A4-landscape
sheet (fixed size in report.css). Print maps one .page → one PDF page
via break-after: page. Pages are composed to fit, not reflowed, so breaks
are deterministic and nothing splits mid-element.
.page blocks.break-inside: avoid on cards/tables/rows and
print-color-adjust: exact (backgrounds/chips/gradients print).@page + --page-w/--page-h (noted in the CSS).Cover first, appendix/conclusion last; reorder the middle for narrative.
| Page | Source | Archetype |
| ------------------------------------- | ---------------------------------------------------------------------------------------------------- | --------------------------- |
| Cover | meta, exec_rollup (4 KPIs + caveat), client logo/name | .cover |
| Exec summary | exec_rollup, top processes, narrative_summary, confidence | KPI row + .card-grid |
| Baseline | baseline (app bars, active days, hours, deep-work) | .bars, KPI, range |
| Process scoring | processes[].scores, category, frequency, confidence, verdict | .tbl + .dots + chips |
| Automation matrix | processes[].scores (impact × automatability) | .matrix + .bub |
| Process detail (top ~5–7 by rank) | processes[]: common_path, steps, automation, savings | step table + savings card |
| Long-tail table | lower-ranked processes[] | .tbl (light) |
| Systems landscape | systems_landscape[] | .sys-grid + status chips |
| Opportunities | top processes by net ROI | .opp cards |
| Appendix | reasoning_log(+counts), assumptions, what_would_sharpen, cost derivation, reproducibility_note | .logrow, .assume, cards |
| Conclusion | narrative_summary + headline tallies | .story + .statlist |
Chips: basis seen|reasoned|estimated→chip--seen|--reason|--est; confidence
high|medium|low→chip--hi|--med|--lo; verdict automate|ai_assist|redesign| not_worth_it→chip--auto|--assist|--redesign|--no; category→chip--cat;
system status→chip--status.
Per-process framing (the actionable core): Symptom → Time → Solution. Solution must be concrete and customer-specific: trigger → their named tool → action → what stays human, plus 2–4 actionable bullets. No generic "automate X". Detail the strongest ~5–7 fully; list the rest in the long-tail table. A "Not worth it" process is shown and explained, never forced into an automation.
Label consistency: every step chip and the future-state scale match the appendix legend's definitions, and each process's overall recommendation is consistent with its steps (an AI-augmented or human-in-the-loop process keeps at least one human/judgment step; flag an all-automate step list under an augmented label). Show recurrence: carry each process's observed run-frequency into its detail tile and any opportunities table, and treat recurrence as the largest single uncertainty.
Conclusion = narrative_summary plus a punchy stat-list (processes found / worth
automating now / repetitive hours / $ recoverable / scope).
Multi-user (cohort) layout. With 2+ ledgers, the exec rollup is AGGREGATED across the population; processes are reported per role/department (founder's rule: numbers aggregate, workflows split by role). Add:
.tbl +
.bar-track).Optional sales-deck sections (shipped patterns, archetypes in components.html).
Use when the deck is a client-facing proposal, not just an internal map:
.tbl): columns Function, Processes, Automatable, New capacity unlocked,
Annual savings, with a "Measured (N users)" total row and a clearly-labelled
"Company-wide (illustrative)" extrapolated row..page.divider): a full-bleed dark interstitial
carrying a 01/02/03 index + the section title (e.g. "Automation
Opportunities", "Next Steps", "Appendix")..opt cards + .confirm box): the
user-supplied options (A/B/C) and an amber "To confirm before we start" box for
client open items (deployment, regulatory). Options + open items are
CLIENT-SUPPLIED, never invented..tba-fn bars): per-function logo bars showing
the top apps that make up roughly 80% of captured time per function (minimum 3
apps), the rest bundled into a dimmed "Other" row. Source: baseline.app_time_share[].Fan out sub-agents via Task where parallel (one per role to consolidate, one
per process for detail pages), then assemble; else do them in order.
meta,
exec_rollup, processes, baseline. Thin/missing/unlabelled → ask (§1).
Resolve report-meta + logo.meta.role/department. Within a role, cluster matching processes (same
category + step shape + tools) into one consolidated process,
conservatively: if two runs differ materially, keep them separate and note
the divergence, never average distinct work. Merge each metric as a range
across people (min–median–max) and record coverage "K of N". Recompute the
exec rollup as the cohort sum (scope: N people, M roles); per-role rollups =
sums within each role; never double-count an activity. When one automation
serves several people/roles, savings still sum per person but its cost is
shared once, not charged per role (else net ROI is understated). One
sub-agent per role works well. 1 ledger → skip, scope n=1.report.html in the working dir: one self-contained file (§3),
clone archetypes, bind real values, enforce the honesty contract (§2), embed
the logo (§4). Tight copy: label, number, basis, done. When many near-identical
pages repeat (one per process), generate them from a single data array, not
hand-edited HTML, so a shared number cannot drift between pages.bash assets/make-pdf.sh report.html /tmp/report-preview.pdf --shots /tmp/report-shots
→ per-page PNGs + overflow report (exit 2 = a page overflows; split it and
re-run) + a page-count check. The /tmp PDF is a throwaway overflow probe;
never present it as the deliverable. Self-review vs components.html:
alignment, hierarchy, every number chipped, no clipping, and every figure
reconciles across pages (per-process → function subtotal → exec headline; any
number repeated on multiple pages matches). Assert the rendered HTML contains
zero em dashes. Two more cheap text checks (wired into make-pdf.sh): count
<section class="page blocks against the planned page count, and scan for an
accidentally duplicated money string (a regex like
A?\$[\d,]+\s+(<b>)?A?\$[\d,]+ catches a value printed twice).report.html live in-workspace; on this Mac, open report.html and/or show
the stage-5 page PNGs inline. Then stop and wait for explicit approval.
Collect changes, edit, re-verify (5), show again, repeat until the user
approves. Surgical edits: when the user asks to change one thing, change ONLY
that property and preserve all sibling styling (color, padding, borders,
radius); reverting means restoring the exact prior values, not a fresh
redesign; re-render and show before/after. Do not proceed to stage 7 without an explicit
"yes / approved / ship it" in this conversation.report-final.html;
bash assets/make-pdf.sh report-final.html report-final.pdf. Verify: page
count == .page count, no overflow, backgrounds/chips intact. Report file
paths, page count, PDF engine used, and any caveat. Write the deliverable to
ONE canonical, human-named file and, on any regeneration, overwrite that same
path; state the exact path back to the user. Do not scatter multiple
differently-named copies (it leads to the user opening a stale file).Default to Playwright Chromium so every render auto-checks overflow
(render-pdf.mjs measures content vs sheet height and flags clipping). If absent,
the verify/finalize steps install it once: npm i -D playwright && npx playwright install chromium. make-pdf.sh also cross-checks expected .page count vs the
PDF's actual page count and warns on mismatch (any engine).
Fallbacks, only if install is impossible (offline/locked sandbox), best-first:
--headless=new --print-to-pdf — good fidelity (CSS forces
print-color-adjust: exact); overflow NOT measured, so say so and eyeball
every page.components.html is the ceiling for prose density; go under.data-ai
(new) Find a person's repeated tasks from their screen activity, and what each one is worth automating, with the time and money saved. Outputs the numbers and data a report is built from, not the visual. Use to analyze processes, mine workflows, or see what is automatable and what it saves. Every figure is labelled and grounded, never made up.
tools
Write step-by-step automation instructions for a workflow, tailored to your tool (Claude, n8n or Zapier). Best run right after discover-patterns or process-analyst.
tools
Summarize what you've been doing in the last 30 minutes.
tools
Generate a time report grouped by client/project