/memorylane:build-reportfrom MemoryLane
Turns a process-mining ledger into a polished HTML deck for client review, then generates a matching PDF after approval. Never fabricates numbers or skips the review step.
Ships in MemoryLane. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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*.md files in the working dir. Each file
embeds the full ledger as a single fenced ```json code block (the last
fenced json block in the file, so a json snippet quoted earlier in the
narrative can't be grabbed by mistake); extract that block to get the ledger
object, and use the narrative text above it for wording. Each ledger is one
observed person (the analysis is single-user by construction). Any producer
of the same shape works. Never print a ledger's source filename or any
per-person file label anywhere in the deck or appendix (a filename like
process-analysis-jane.md is itself an identifier); refer to ledgers by role
only.
process-analysis*.md (and any paths the user
gives), then extract each file's embedded json block. 1 file → single-user
report. 2+ → consolidated report (§7 stage 2).meta.user_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: user_role, department, location, window, active_days,
measurement_scope, cost_basis (rate, derivation, basis); optional
report_title, client.exec_rollup: total_repetitive_hours_per_week, automatable_pct,
capacity_unlocked_pct, hours_saved_per_year, dollars_saved_per_year_net,
fte_capacity_unlocked_this_person, 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, tier,
frequency{occurrences_clean,occurrences_possible,period}, time_per_instance_min,
common_path{description,approx_coverage_pct}, steps[]{action,app,input,output,
time_min,pain,automatable,basis}, automation{verdict,future_state,route,
effort_tier,work_nature,mechanism,feasibility,tool,automatable_fraction_low,
automatable_fraction_high,human_remainder,automation_cost},
scores{impact_hours,automatability,effort,priority_rank}, confidence{grade},
savings{annual_hours_saved,gross_annual_dollars_saved,net_annual_dollars_saved,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:
meta.location/market suggests Philippines, Malaysia, Czech Republic,
Slovakia, Germany, Austria, or Switzerland) and currency if not carried
in cost_basis (see §2's locale table for the separator convention + symbol
per market).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; currency follows the ledger, A$ shown as the example).
Locale first, before applying the house style below. The comma-thousands /
period-decimal pattern in the examples below (~A$6,200) is the English-market
convention (Philippines, Malaysia, Australia, New Zealand business English). It is
NOT universal:
~15.500 Kč or ~15 500,00 Kč, not 15,500.00).~4 200,00 €).~4.200,00 €).CHF 4'200.00); confirm with the client which they use.
Detect the target locale from the ledger's meta.location/cost_basis.currency
and the client's market, then apply THAT locale's separator convention
consistently across every page; never default to the English pattern for a
non-English-convention market. Rounding grain, ~ usage, and the "New capacity
unlocked" wording rules below apply the same regardless of locale, only the
separator and symbol change.Report language. The house style and copy below is written in English. If
the client requests the deck in a local language (Filipino/Tagalog, Bahasa
Malaysia, Czech, Slovak, German), translate the narrative, page titles, KPI
labels, and chip display text into that language, but never translate the
underlying ledger enum values (basis: seen|reasoned|estimated,
verdict: kill|leave_as_is|redesign|automate, etc.); those stay in English so
the JSON keeps parsing/reconciling correctly, only their rendered label changes.
Ask which language the deck should ship in during intake (§1) if the client's
market suggests it is not English; default to English if unstated.
1h/week (2%) (no space inside 1h, one space before the
parenthesis). For example: 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.
/tmp/logo.<ext>; 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. The download
asks for approval; if refused, use the text wordmark..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. Downloads ask
for approval; if refused, leave the icons out.favicon.ico is sometimes actually a PNG (one client's was a 231×231
PNG named .ico). Detect the real type and convert or rename it 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 kill|leave_as_is|redesign| automate→chip--kill|--leave|--redesign|--auto (matches the ledger's
automation.verdict enum exactly, not a paraphrase); future_state
no_change|ai_augmented|human_in_the_loop|automated|eliminated→its own chevron
chip; 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.user_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 ${CLAUDE_SKILL_DIR}/assets/make-pdf.sh report.html /tmp/report-preview.pdf --shots /tmp/report-shots
→ overflow report (exit 2 = a page overflows; split it and re-run) + a
page-count check + per-page PNGs (Playwright only; otherwise Read the PDF's
pages). 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).
PII scan (mandatory, before the review gate): regex-scan the rendered
report.html text for emails ([\w.+-]+@[\w-]+\.\w), phone-number patterns,
@handles, credential/token URL params ((token|key|secret|sig|signature| auth|session|sid|apikey|api_key|password)=..., a JWT, an AWS/API key
pattern), card/bank numbers (Luhn-gated) and IBANs, and national IDs across
every market this ships to, not just US SSN (see the analyst skill's
Privacy scrub for the exact per-market regex: Philippines SSS/TIN/PhilHealth,
Malaysia NRIC, Czech/Slovak rodné číslo, Germany/Austria Steuer-ID or
Sozialversicherungsnummer, Switzerland AHV/AVS, Australia TFN/Medicare, New
Zealand IRD); also grep for the observed person's actual name if the user
supplied one anywhere, for any ledger source filename (per §1), and for
keyword triggers ("DOB", "Passport No", "SSN", "diagnosis", "MRN", "patient")
that flag content needing a generic paraphrase. Any hit → fix the source
binding (never hand-edit the HTML to hide it) and re-render before showing the
deck. A hit on a kept file/filter/URL-path/formula name is not a match;
don't strip those.report.html live in-workspace; elsewhere, 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 ${CLAUDE_SKILL_DIR}/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).Playwright Chromium, if already installed in the working folder or on NODE_PATH,
renders the PDF and writes page PNGs (render-pdf.mjs). Never install it. make-pdf.sh
measures overflow on Playwright and system browsers, and cross-checks expected .page
count vs the PDF's actual page count and warns on mismatch (any engine).
Fallbacks when Playwright isn't there, best-first:
--headless=new --print-to-pdf — good fidelity (CSS
forces print-color-adjust: exact); no PNGs, so Read the PDF's pages to
check them.components.html is the ceiling for prose density; go under.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub deusxmachina-dev/memorylane --plugin memorylane6 skills in this plugin
/analyze-processesFind 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.
/build-n8n-workflow(BETA) Turn one process from a MemoryLane analysis, report or screen recording into a simple working n8n workflow, plus a short recipe to test and publish it. Builds the workflow in n8n when connected, else a file to paste in. One happy path, fewest steps. Use after analyze-processes.
/build-netsuite-automation(BETA) Turn one process from a MemoryLane analysis, report or screen recording into a simple NetSuite automation (SuiteFlow, plus a script only where needed), with a short recipe to build, test and switch it on. One happy path, fewest steps. Use after analyze-processes.
/recent-activitySummarize what you've been doing in the last 30 minutes./write-automation-guideWrite step-by-step automation instructions for a workflow, tailored to your tool (Claude, n8n or Zapier). Best run right after analyze-processes.Other plugins' skills for the same job