From 7d0c9c0549fac56e8da506a59c65a2c0f36cd3dd Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 17:08:11 -0800 Subject: [PATCH 1/2] Demo: an engagement on a made-up firm with the kit alone; plugin 0.9.0 demos/fernhill: a kitchen firm's material (documents, a job log, an interview), the first run's map, baselines, a judged cell (the quote calculator: held-out cost error 12.4% to 3.4%, pass) and four options for job scheduling, the report of implementation projects, and run.sh/check.py for the engagement unattended. The plugin's version moves to 0.9.0: #102 and #103 changed it under 0.8.0, so `claude plugin update` kept the old code. Co-Authored-By: Claude Opus 5.5 --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- demos/README.md | 3 +- demos/fernhill/README.md | 42 ++++ demos/fernhill/check.py | 75 ++++++++ demos/fernhill/engagement/.gitignore | 4 + .../fernhill/engagement/analysis/baseline.py | 70 +++++++ .../fernhill/engagement/analysis/baseline.txt | 22 +++ demos/fernhill/engagement/analysis/map.mmd | 23 +++ demos/fernhill/engagement/analysis/split.py | 40 ++++ demos/fernhill/engagement/catalog-info.yaml | 25 +++ .../fernhill/engagement/catalog/process.yaml | 102 ++++++++++ demos/fernhill/engagement/catalog/quote.yaml | 55 ++++++ .../engagement/catalog/scheduling.yaml | 130 +++++++++++++ demos/fernhill/engagement/catalog/teams.yaml | 53 +++++ demos/fernhill/engagement/catalog/tools.yaml | 65 +++++++ .../fernhill/engagement/cells/quote/bench.py | 15 ++ .../engagement/cells/quote/estimate.py | 35 ++++ .../fernhill/engagement/cells/quote/score.py | 24 +++ .../engagement/cells/quote/tests/__init__.py | 0 .../cells/quote/tests/test_estimate.py | 42 ++++ demos/fernhill/engagement/report.md | 181 ++++++++++++++++++ demos/fernhill/making/make_jobs.py | 134 +++++++++++++ demos/fernhill/material/interview.md | 61 ++++++ demos/fernhill/material/jobs.csv | 122 ++++++++++++ demos/fernhill/material/jobs.md | 22 +++ demos/fernhill/material/overview.md | 32 ++++ demos/fernhill/material/process.md | 24 +++ demos/fernhill/material/quote-calculator.md | 28 +++ demos/fernhill/material/tools.md | 18 ++ demos/fernhill/prompt.md | 25 +++ demos/fernhill/run.sh | 31 +++ 32 files changed, 1504 insertions(+), 3 deletions(-) create mode 100644 demos/fernhill/README.md create mode 100644 demos/fernhill/check.py create mode 100644 demos/fernhill/engagement/.gitignore create mode 100644 demos/fernhill/engagement/analysis/baseline.py create mode 100644 demos/fernhill/engagement/analysis/baseline.txt create mode 100644 demos/fernhill/engagement/analysis/map.mmd create mode 100644 demos/fernhill/engagement/analysis/split.py create mode 100644 demos/fernhill/engagement/catalog-info.yaml create mode 100644 demos/fernhill/engagement/catalog/process.yaml create mode 100644 demos/fernhill/engagement/catalog/quote.yaml create mode 100644 demos/fernhill/engagement/catalog/scheduling.yaml create mode 100644 demos/fernhill/engagement/catalog/teams.yaml create mode 100644 demos/fernhill/engagement/catalog/tools.yaml create mode 100644 demos/fernhill/engagement/cells/quote/bench.py create mode 100644 demos/fernhill/engagement/cells/quote/estimate.py create mode 100644 demos/fernhill/engagement/cells/quote/score.py create mode 100644 demos/fernhill/engagement/cells/quote/tests/__init__.py create mode 100644 demos/fernhill/engagement/cells/quote/tests/test_estimate.py create mode 100644 demos/fernhill/engagement/report.md create mode 100644 demos/fernhill/making/make_jobs.py create mode 100644 demos/fernhill/material/interview.md create mode 100644 demos/fernhill/material/jobs.csv create mode 100644 demos/fernhill/material/jobs.md create mode 100644 demos/fernhill/material/overview.md create mode 100644 demos/fernhill/material/process.md create mode 100644 demos/fernhill/material/quote-calculator.md create mode 100644 demos/fernhill/material/tools.md create mode 100644 demos/fernhill/prompt.md create mode 100755 demos/fernhill/run.sh diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index dffd2ba..babd6fd 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -11,7 +11,7 @@ "name": "morphogen", "source": "./", "description": "Improve a system at any scope, from one cell to the whole, behind a judge the agent cannot edit.", - "version": "0.8.0" + "version": "0.9.0" } ] } diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 939dc23..71b960d 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "$schema": "https://anthropic.com/claude-code/plugin.schema.json", "name": "morphogen", - "version": "0.8.0", + "version": "0.9.0", "description": "Improve a system at any scope, from one cell to the whole, behind a judge the agent cannot edit: structure, judge, evidence and optimizers over MCP.", "author": { "name": "OpenReplicant" diff --git a/demos/README.md b/demos/README.md index 7d0b44c..02cd834 100644 --- a/demos/README.md +++ b/demos/README.md @@ -10,8 +10,9 @@ is a component that stands alone, or a larger system built from them. | [entity-resolution](entity-resolution/BRIEF.md) | decide whether two records name the same entity, behind one interface with swappable backends | nothing | | [catalog](catalog/BRIEF.md) | take in entities: resolve, classify under adopted schemes, attach claims with trust | entity-resolution | | [cognitive-model](cognitive-model/BRIEF.md) | the Common Model of Cognition on Claude Code | catalog, and the rest of its spec | +| [fernhill](fernhill/README.md) | an engagement on a made-up kitchen firm: mapped from its documents and an interview, one opportunity judged, options for one role, a report of implementation projects | the kit alone (no code to build) | -Build them in that order: each one's cells become available to the next. +Build the first three in that order: each one's cells become available to the next. `fernhill` stands alone. ## Rules diff --git a/demos/fernhill/README.md b/demos/fernhill/README.md new file mode 100644 index 0000000..7eb3e94 --- /dev/null +++ b/demos/fernhill/README.md @@ -0,0 +1,42 @@ +# Fernhill: an engagement on a made-up firm + +The kit alone (the `map`, `catalog` and `morphogen` skills, Morphogen's CLI and judge; no database, no kernel) on a +small business that does not exist: from its documents and an interview to a report of optimisation opportunities, +each written up as an implementation project. It is the kit's done-when (a made-up firm mapped into entity files, +options catalogued for one role, cells drafted for one opportunity) and a demo of what an engagement delivers. + +| Folder | What it is | +| --- | --- | +| [material/](material/) | the firm's material, as a client would hand it over: an overview, the office handbook, the systems list, the quote calculator, the job sheet export (`jobs.csv`, 121 jobs) and an interview with the director. All made up. | +| [making/](making/) | how `jobs.csv` was made (`make_jobs.py`, one seed). It holds the true costs the engagement has to find, so no engagement run sees it. | +| [engagement/](engagement/) | the first run's result, done in a Claude Code session following the skills: the map (`catalog-info.yaml`, `catalog/`), the baselines (`analysis/`), the quote calculator as a judged cell (`cells/quote/`), four options for job scheduling (`catalog/scheduling.yaml`) and [the report](engagement/report.md). | +| `prompt.md`, `run.sh`, `check.py` | the engagement unattended: a fresh project from `material/`, Claude Code with only the plugin, then the checks of its result | + +## The first run (2026-11-24) + +- **Mapped:** the firm as a System, 5 teams, 6 process steps, its tools and 2 roles; 40 evidence quotes, all found + on the lines they cite (`check.py`). +- **Judged:** the quote calculator, as code with its six cost constants free within bounds and the margin held + fixed. Held-out cost error 12.4% to 3.4% after `tune` (40 trials), **pass**, 7 runs, sign test p = 0.008, in + Podman. +- **Catalogued:** Fergus, Tradify, ServiceM8 and shared Google calendars for job scheduling, each fact quoted from + the vendor's own page; none measured (a trial needs accounts, the operator's call). +- **Report:** four projects: the calculator (about £53,000 a year of margin), quotes in three days, a schedule the + fitters can see, fewer remakes. + +What the run found in the kit, for issues: + +1. **A plugin update did not happen.** #102 and #103 changed the plugin but not its version (0.8.0), so + `claude plugin update` reported "already at the latest version" and kept code from before them; the old code + read only `morphogen.yaml`. Fixed here: 0.9.0. A version bump belongs in every pull request that changes the + plugin. +2. **A cell that cannot pass.** With `max_repeats: 6` a deterministic score cannot reach the sign test's bar (the + best p is 0.0156), so a 9-point gain failed. `status` and `structure_check` could say so before a run. +3. **Org maps are noisy in `status`.** Every process step is listed as a cell, `ready: false`, though none has a + `run`; structure-only entities could be listed apart. +4. **The CLI needs a file.** `morphogen structure check` takes the catalog's path, where `status` finds it itself. + +Run it again (Python 3.11 or later, Podman, Claude Code signed in): + + demos/fernhill/run.sh /path/to/empty/workdir + python3 making/make_jobs.py # only to rebuild material/jobs.csv diff --git a/demos/fernhill/check.py b/demos/fernhill/check.py new file mode 100644 index 0000000..17e1fa9 --- /dev/null +++ b/demos/fernhill/check.py @@ -0,0 +1,75 @@ +"""Check what an engagement left: the done-when of the demo, as checks a script can make. + + python3 demos/fernhill/check.py PROJECT PLUGIN_DIR + +PROJECT is the engagement's git repository; PLUGIN_DIR is Morphogen's plugin, whose CLI does the structure and +status checks. Standard library only. Prints one line per check and exits 1 if any fails. It checks the form of +the result, not its judgement: whether the opportunities are the right ones is for a person reading report.md. +""" + +import json +import re +import subprocess +import sys +from pathlib import Path + +proj, plugin = Path(sys.argv[1]).resolve(), sys.argv[2] +results = [] + + +def check(name, ok, detail=""): + results.append(ok) + print(f"{'PASS' if ok else 'FAIL'} {name}" + (f": {detail}" if detail else "")) + + +def git(*args): + return subprocess.run(["git", *args], cwd=proj, capture_output=True, text=True).stdout + + +def morphogen(*args): + r = subprocess.run(["uv", "run", "--quiet", "--project", plugin, "morphogen", *args], cwd=proj, + capture_output=True, text=True) + try: + return json.loads(r.stdout) + except json.JSONDecodeError: + return {"error": (r.stdout + r.stderr).strip()[-300:]} + + +tracked = set(git("ls-files").split()) +check("report.md committed on main", "report.md" in git("ls-tree", "--name-only", "main").split()) +check("the client's material is not committed", not any(p.startswith("material/") for p in tracked)) +catalog = [proj / p for p in tracked if p.endswith((".yaml", ".yml")) and (p == "catalog-info.yaml" or p.startswith("catalog/"))] +check("a catalog", (proj / "catalog-info.yaml") in catalog, f"{len(catalog)} files") + +found = morphogen("structure", "check", "catalog-info.yaml") +errors = [f for f in found.get("findings", []) if f.get("severity") == "error"] +check("structure check: no errors", "error" not in found and not errors, + found.get("error") or "; ".join(f["message"] for f in errors[:3])) + +status = morphogen("status") +judged = [c["cell"] for c in status.get("cells", []) if c.get("verdicts")] +check("a cell with a verdict", bool(judged), ", ".join(judged) or status.get("next", status.get("error", ""))) + +text = "\n".join(p.read_text() for p in catalog if p.exists()) +candidates = len(re.findall(r"lifecycle:\s*candidate", text)) +check("at least three options for a role", candidates >= 3, f"{candidates} candidates") + +# Evidence lines: `trust | file:Lnn[-mm] | "quote"`. A quote must be on the lines it names; URLs are not fetched. +total, misses = 0, [] +for m in re.finditer(r'^\s*(stated|inferred) \| ([^|\s]+?):L(\d+)(?:-(\d+))? \| "(.+)"\s*$', text, re.M): + _, path, a, b, quote = m.groups() + total += 1 + src = proj / path + lines = src.read_text().splitlines() if src.is_file() else [] + span = "\n".join(lines[int(a) - 1:int(b or a)]) + if quote.strip('"') not in span: + misses.append(f"{path}:L{a}") +check("evidence quotes are where they say", total > 0 and not misses, + f"{total - len(misses)} of {total}" + (f"; first misses: {', '.join(misses[:3])}" if misses else "")) + +report = (proj / "report.md").read_text() if (proj / "report.md").exists() else "" +words = ["target", "measure", "option", "cost", "risk"] +absent = [w for w in words if w not in report.lower()] +check("the report writes opportunities up as projects", not absent, "missing: " + ", ".join(absent) if absent else "") + +sys.exit(0 if all(results) else 1) diff --git a/demos/fernhill/engagement/.gitignore b/demos/fernhill/engagement/.gitignore new file mode 100644 index 0000000..81ab460 --- /dev/null +++ b/demos/fernhill/engagement/.gitignore @@ -0,0 +1,4 @@ +material/ +morphogen.local.yaml +.morphogen/ +__pycache__/ diff --git a/demos/fernhill/engagement/analysis/baseline.py b/demos/fernhill/engagement/analysis/baseline.py new file mode 100644 index 0000000..1b64f9e --- /dev/null +++ b/demos/fernhill/engagement/analysis/baseline.py @@ -0,0 +1,70 @@ +"""The engagement's baselines, from the job sheet export: one line per measure. + + python analysis/baseline.py material/jobs.csv > analysis/baseline.txt + +Each line: measure, value, and how it was computed. Standard library only. +""" + +import csv +import statistics as st +import sys +from datetime import date + +LABOUR_RATE = 32.0 # material/quote-calculator.md, B16 +MARGIN = 0.35 # B18 + + +def d(s): + return date.fromisoformat(s) if s else None + + +def main(path): + rows = list(csv.DictReader(open(path))) + decided = [r for r in rows if r["outcome"] in ("won", "lost")] + lag = lambda r: (d(r["quote_sent_date"]) - d(r["survey_date"])).days + out = [] + say = lambda k, v, how: out.append(f"{k}\t{v}\t{how}") + say("jobs", len(rows), "rows in jobs.csv") + say("won/lost/pending", "/".join(str(sum(r["outcome"] == o for r in rows)) for o in ("won", "lost", "pending")), "outcome") + say("win_rate", f"{sum(r['outcome'] == 'won' for r in decided) / len(decided):.2f}", "won / (won + lost)") + lags = [lag(r) for r in rows] + say("quote_days_median", st.median(lags), "quote_sent_date - survey_date, calendar days, all jobs") + say("quote_days_within_5", f"{sum(x <= 5 for x in lags) / len(lags):.2f}", "share of quotes sent within 5 days of the survey") + for lo, hi in ((0, 5), (6, 9), (10, 14), (15, 999)): + s = [r for r in decided if lo <= lag(r) <= hi] + if s: + say(f"win_rate_quote_{lo}_{hi if hi < 999 else 'plus'}_days", f"{sum(r['outcome'] == 'won' for r in s) / len(s):.2f}", f"n={len(s)}") + lost = [r for r in rows if r["outcome"] == "lost"] + say("lost_to_quicker_quote", sum(r["lost_reason"] == "went with a quicker quote" for r in lost), "lost_reason, of lost jobs") + done = [r for r in rows if r["actual_materials"]] + say("completed_with_costs", len(done), "rows with actual_materials") + margins, cost_err, under = [], [], 0 + for r in done: + cost = float(r["actual_materials"]) + LABOUR_RATE * float(r["actual_labour_hours"]) + price = float(r["quoted_price"]) + quoted_cost = price / (1 + MARGIN) + margins.append((price - cost) / cost) + cost_err.append((quoted_cost - cost) / cost) + under += cost > quoted_cost + say("markup_on_cost_median", f"{st.median(margins):.3f}", "(quoted_price - actual cost) / actual cost; intended 0.35") + say("jobs_at_a_loss", sum(m < 0 for m in margins), "actual cost above quoted_price") + say("quoted_cost_error_median", f"{st.median(cost_err):+.3f}", "(quoted_price/1.35 - actual cost) / actual cost") + say("jobs_cost_underestimated", f"{under}/{len(done)}", "actual cost above the calculator's cost") + shortfall = sum(float(r["quoted_price"]) / (1 + MARGIN) * MARGIN - (float(r["quoted_price"]) - float(r["actual_materials"]) - LABOUR_RATE * float(r["actual_labour_hours"])) for r in done) + say("margin_shortfall_gbp", f"{shortfall:.0f}", "intended margin minus realised margin, summed over completed jobs") + rem = [int(r["remade_cabinets"] or 0) for r in done] + say("jobs_with_remakes", f"{sum(x > 0 for x in rem)}/{len(done)}", "remade_cabinets > 0") + say("remakes_from_survey", sum(1 for r in done if r["remake_cause"] == "survey measurement"), "jobs, remake_cause") + slips = [(d(r["fit_start"]) - d(r["fit_planned_start"])).days for r in done] + say("fit_slipped_share", f"{sum(s > 0 for s in slips) / len(slips):.2f}", "fit_start after fit_planned_start") + say("fit_slip_days_median_when_slipped", st.median([s for s in slips if s > 0]), "days") + inv = [(d(r["final_invoice_date"]) - d(r["fit_end"])).days for r in done] + say("invoice_days_median", st.median(inv), "final_invoice_date - fit_end") + paid = [r for r in done if r["paid_date"]] + balance = sum(float(r["quoted_price"]) * 0.6 for r in done) / len(done) + say("balance_avg_gbp", f"{balance:.0f}", "60% of quoted_price, completed jobs") + print("\n".join(out)) + + +if __name__ == "__main__": + main(sys.argv[1]) diff --git a/demos/fernhill/engagement/analysis/baseline.txt b/demos/fernhill/engagement/analysis/baseline.txt new file mode 100644 index 0000000..3e0b49e --- /dev/null +++ b/demos/fernhill/engagement/analysis/baseline.txt @@ -0,0 +1,22 @@ +jobs 121 rows in jobs.csv +won/lost/pending 52/62/7 outcome +win_rate 0.46 won / (won + lost) +quote_days_median 9 quote_sent_date - survey_date, calendar days, all jobs +quote_days_within_5 0.17 share of quotes sent within 5 days of the survey +win_rate_quote_0_5_days 0.80 n=20 +win_rate_quote_6_9_days 0.57 n=44 +win_rate_quote_10_14_days 0.32 n=34 +win_rate_quote_15_plus_days 0.00 n=16 +lost_to_quicker_quote 15 lost_reason, of lost jobs +completed_with_costs 50 rows with actual_materials +markup_on_cost_median 0.163 (quoted_price - actual cost) / actual cost; intended 0.35 +jobs_at_a_loss 2 actual cost above quoted_price +quoted_cost_error_median -0.138 (quoted_price/1.35 - actual cost) / actual cost +jobs_cost_underestimated 50/50 actual cost above the calculator's cost +margin_shortfall_gbp 83576 intended margin minus realised margin, summed over completed jobs +jobs_with_remakes 6/50 remade_cabinets > 0 +remakes_from_survey 5 jobs, remake_cause +fit_slipped_share 0.48 fit_start after fit_planned_start +fit_slip_days_median_when_slipped 5.5 days +invoice_days_median 12.5 final_invoice_date - fit_end +balance_avg_gbp 7512 60% of quoted_price, completed jobs diff --git a/demos/fernhill/engagement/analysis/map.mmd b/demos/fernhill/engagement/analysis/map.mmd new file mode 100644 index 0000000..28dd1c6 --- /dev/null +++ b/demos/fernhill/engagement/analysis/map.mmd @@ -0,0 +1,23 @@ +flowchart LR + subgraph c_fernhill["fernhill"] + c_design["design"] + c_final_invoice["final-invoice"] + c_fit["fit"] + c_orders["orders"] + c_quote["quote"] + c_quote_calculator["quote-calculator"] + c_survey["survey"] + c_whiteboard["whiteboard"] + end + outside(["outside"]) + c_whiteboard -->|"fitting-schedule"| c_fit + i_job_spec(("job-spec")) + c_design --> i_job_spec + c_quote_calculator --> i_job_spec + i_job_spec --> c_orders + i_job_spec --> c_quote + outside -->|"resource:sketchup"| c_design + outside -->|"resource:xero"| c_final_invoice + c_survey -->|"room-survey"| c_design + classDef absence stroke-dasharray: 5 5,opacity:0.6 + classDef divergence stroke:#d33,stroke-width:2px diff --git a/demos/fernhill/engagement/analysis/split.py b/demos/fernhill/engagement/analysis/split.py new file mode 100644 index 0000000..6b64471 --- /dev/null +++ b/demos/fernhill/engagement/analysis/split.py @@ -0,0 +1,40 @@ +"""Write the quote cell's data outside the repository: the jobs' inputs and two answer sets. + + python analysis/split.py material/jobs.csv OUT + +OUT/inputs/jobs.jsonl every completed job's four inputs and survey date (no costs): `inputs` +OUT/search/actuals.json actual costs of the search split, for probes and tuning: `search` +OUT/holdout/actuals.json actual costs of the held-out split, for verdicts only: `private` + +A job is held out when the first byte of sha256(SALT + job_id) is in the top 40% of its range. Prints the lines +for morphogen.local.yaml. +""" + +import csv +import hashlib +import json +import sys +from pathlib import Path + +SALT = "fernhill-quote-v1:" +LABOUR_RATE = 32.0 + +src, out = sys.argv[1], Path(sys.argv[2]).expanduser().resolve() +if out.is_relative_to(Path(__file__).resolve().parents[1]): + sys.exit("OUT must be outside the repository") +jobs, actuals = [], {"search": {}, "holdout": {}} +for r in csv.DictReader(open(src)): + if not r["actual_materials"]: + continue + jobs.append({"job_id": r["job_id"], "cabinets": int(r["cabinets"]), "range": r["range"], + "worktop_material": r["worktop_material"], "worktop_m": float(r["worktop_m"]), + "survey_date": r["survey_date"]}) + split = "holdout" if hashlib.sha256((SALT + r["job_id"]).encode()).digest()[0] / 256 >= 0.6 else "search" + actuals[split][r["job_id"]] = round(float(r["actual_materials"]) + LABOUR_RATE * float(r["actual_labour_hours"]), 2) +for d in ("inputs", "search", "holdout"): + (out / d).mkdir(parents=True, exist_ok=True) +(out / "inputs" / "jobs.jsonl").write_text("".join(json.dumps(j) + "\n" for j in jobs)) +for s in ("search", "holdout"): + (out / s / "actuals.json").write_text(json.dumps(actuals[s], indent=0)) +print(f"# {len(jobs)} jobs: {len(actuals['search'])} search, {len(actuals['holdout'])} held out") +print(f"cells:\n quote-calculator:\n inputs: {out / 'inputs'}\n search: {out / 'search'}\n private: {out / 'holdout'}") diff --git a/demos/fernhill/engagement/catalog-info.yaml b/demos/fernhill/engagement/catalog-info.yaml new file mode 100644 index 0000000..1f7f13b --- /dev/null +++ b/demos/fernhill/engagement/catalog-info.yaml @@ -0,0 +1,25 @@ +# Fernhill Kitchens (made up), mapped for an engagement: the firm as a System, its teams, the steps a job goes +# through, the tools behind them and the roles they play. Claims cite the firm's material (material/, kept out of +# the repository) or the baselines computed from it (analysis/baseline.txt). +apiVersion: backstage.io/v1alpha1 +kind: System +metadata: + name: fernhill + description: Fernhill Kitchens, an 11-person kitchen design, build and fit firm. Made up for Morphogen's demo engagement. + annotations: + morphogen.dev/evidence: | + stated | material/overview.md:L6 | "founded in 2009 by Sian Hollis, a joiner, and we have grown to 11 people" + stated | material/overview.md:L30 | "Turnover about £400,000; about 30 kitchens fitted." + stated | material/interview.md:L8 | "We're busier than we've ever been and the bank balance doesn't" +spec: + owner: group:default/directors + lifecycle: production + morphogen: + defaults: {rounds: {warmup: 0, repeats: 4, max_repeats: 8}, timeout: 60} +--- +apiVersion: backstage.io/v1alpha1 +kind: Location +metadata: + name: fernhill-map +spec: + targets: [./catalog/teams.yaml, ./catalog/process.yaml, ./catalog/tools.yaml, ./catalog/quote.yaml, ./catalog/scheduling.yaml] diff --git a/demos/fernhill/engagement/catalog/process.yaml b/demos/fernhill/engagement/catalog/process.yaml new file mode 100644 index 0000000..81f1e12 --- /dev/null +++ b/demos/fernhill/engagement/catalog/process.yaml @@ -0,0 +1,102 @@ +# The steps a job goes through (material/process.md), as parts of the firm. Each says which team does it, the +# tools it uses (dependsOn) and the interfaces it hands work on by (consumesApis, providesApis). +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: survey + description: A designer measures the room with a tape and a laser and sketches it on paper. + annotations: + morphogen.dev/evidence: | + stated | material/process.md:L7 | "Owen or Priya visits, measures with a tape and a laser, sketches the room on paper, takes photos" + stated | material/interview.md:L40 | "Owen and Priya measure with a tape and a laser and a pencil, and every so often a" + stated | analysis/baseline.txt:L17 | "jobs_with_remakes 6/50" +spec: {type: process-step, lifecycle: production, owner: group:default/design-sales, system: fernhill, providesApis: [room-survey]} +--- +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: design + description: The designer draws the kitchen in SketchUp from the survey; two or three rounds with the customer. + annotations: + morphogen.dev/evidence: | + stated | material/process.md:L9 | "Back in the office the designer draws the kitchen in SketchUp. Two or three rounds with the" +spec: + type: process-step + lifecycle: production + owner: group:default/design-sales + system: fernhill + consumesApis: [room-survey] + providesApis: [job-spec] + dependsOn: [resource:default/sketchup] +--- +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: quote + description: >- + The designer types the job's four inputs into the quote calculator, writes the quote in Word and emails it. + Median 9 days from survey to quote; 17% inside the handbook's 5 days; the win rate falls from 0.80 (0-5 days) + to 0.00 (15 days or more). + annotations: + morphogen.dev/evidence: | + stated | material/process.md:L11 | "The designer counts cabinets and worktop metres off the drawing and types them into the quote" + stated | material/process.md:L13 | "Aim: quote within 5 working days of the survey." + stated | analysis/baseline.txt:L4 | "quote_days_median 9" + stated | analysis/baseline.txt:L9 | "win_rate_quote_15_plus_days 0.00 n=16" + stated | material/interview.md:L16 | "And I'm sure we lose jobs because we're slow to quote." +spec: + type: process-step + lifecycle: production + owner: group:default/design-sales + system: fernhill + consumesApis: [job-spec] +--- +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: orders + description: Dee orders carcasses, hardware and worktops by email, retyped from the quote; quartz is booked after fitting. + annotations: + morphogen.dev/evidence: | + stated | material/process.md:L19 | "Order details are retyped from the quote." +spec: + type: process-step + lifecycle: production + owner: group:default/office + system: fernhill + consumesApis: [job-spec] +--- +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: fit + description: >- + A fitting pair fits the kitchen in the week the whiteboard gives it; quartz is templated, then fitted about ten + days later. 48% of completed jobs started later than first planned (median slip 5.5 days when they did). + annotations: + morphogen.dev/evidence: | + stated | material/process.md:L21 | "Their week is on the whiteboard and in a WhatsApp group." + stated | material/interview.md:L38 | "Twice this year two pairs turned up at the same house and one job had" + stated | analysis/baseline.txt:L19 | "fit_slipped_share 0.48" +spec: + type: process-step + lifecycle: production + owner: group:default/fitting + system: fernhill + consumesApis: [fitting-schedule] +--- +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: final-invoice + description: Dee raises the 60% balance in Xero once told the job is signed off; median 12.5 days after the fit ends. + annotations: + morphogen.dev/evidence: | + stated | material/process.md:L24 | "60% balance, raised by Dee in Xero when the lead fitter tells her the job is signed off." + stated | analysis/baseline.txt:L21 | "invoice_days_median 12.5" +spec: + type: process-step + lifecycle: production + owner: group:default/office + system: fernhill + dependsOn: [resource:default/xero] diff --git a/demos/fernhill/engagement/catalog/quote.yaml b/demos/fernhill/engagement/catalog/quote.yaml new file mode 100644 index 0000000..d129f3e --- /dev/null +++ b/demos/fernhill/engagement/catalog/quote.yaml @@ -0,0 +1,55 @@ +# The opportunity drafted as a cell: the quote calculator, as code (cells/quote/estimate.py, the v7 sheet's +# formula and constants), judged on how close its cost comes to what completed jobs actually cost. The margin and +# the labour rate are the firm's (the operator: "35% on cost is the number the bank and I agreed and I want to +# actually get it, not change it"), so they are kept fixed; the constants that describe costs may move. +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: quote-calculator + description: >- + Quote calculator v7.xlsx: a job's four inputs in, cost and price out. Its costs are below actual on all 50 + completed jobs (median -13.8%); realised markup 16.3% on cost against the intended 35%. + annotations: + morphogen.dev/evidence: | + stated | material/quote-calculator.md:L27 | "The constants were last changed in March 2023. Nobody compares a job's quote with what it cost afterwards; the" + stated | material/interview.md:L14 | "Lindale put their" + stated | analysis/baseline.txt:L15 | "jobs_cost_underestimated 50/50" + stated | analysis/baseline.txt:L12 | "markup_on_cost_median 0.163" +spec: + type: tool + lifecycle: production + owner: group:default/design-sales + system: fernhill + providesApis: [job-spec] + morphogen: + description: Estimate a kitchen job's cost (materials and labour) as close as possible to what it will cost. + dir: cells/quote + change: + - cells/quote/estimate.py#CARCASS_STANDARD in 150..320 + - cells/quote/estimate.py#CARCASS_PREMIUM in 250..500 + - cells/quote/estimate.py#WORKTOP_WASTE in 0.0..0.4 + - cells/quote/estimate.py#HOURS_PER_CABINET in 3..12 + - cells/quote/estimate.py#HOURS_PER_WORKTOP_M in 0.5..4 + - cells/quote/estimate.py#FIXED_HOURS in 8..40 + keep: [cells/quote/estimate.py#MARGIN, cells/quote/estimate.py#LABOUR_RATE] + run: python bench.py + score: python score.py + better: {mape: {lower: true, min: 0.01, gain: absolute}} + tests: python -m unittest -q tests.test_estimate +--- +apiVersion: backstage.io/v1alpha1 +kind: API +metadata: + name: job-spec + description: A job as the calculator takes it (cabinets, range, worktop material, worktop metres) and its cost and price. + annotations: + morphogen.dev/evidence: | + stated | material/quote-calculator.md:L5 | "The designer types four things: the number of cabinets, the range (Standard or Premium), the worktop material" +spec: + type: python + lifecycle: production + owner: group:default/design-sales + system: fernhill + definition: cells/quote/estimate.py (cost, price) + morphogen: + tests: cd cells/quote && python -m unittest -q tests.test_estimate diff --git a/demos/fernhill/engagement/catalog/scheduling.yaml b/demos/fernhill/engagement/catalog/scheduling.yaml new file mode 100644 index 0000000..6402ac7 --- /dev/null +++ b/demos/fernhill/engagement/catalog/scheduling.yaml @@ -0,0 +1,130 @@ +# Options for the role `job-scheduling` (catalog/tools.yaml), found 2026-11-24 (the catalog skill). +# The need, written before looking: (1) `fitting-schedule`: each job's fitting pair, address, days, quartz +# template date and parts, across multi-day jobs; (2) the fitters read it on their own Android phones; (3) +# `xero-invoices`: a signed-off job's final invoice reaches Xero without retyping; (4) no server to run; (5) "a few +# hundred pounds a month if it pays for itself", for about 9 people (2 directors, 1 office, 2 designers, 4 fitters). +# Measured by: fitting starts that slip (48% now), double-bookings (two this year, the operator), days from sign-off +# to final invoice (median 12.5 now). Ruled out: anything self-hosted (need 4; material/tools.md:L21). +apiVersion: backstage.io/v1alpha1 +kind: API +metadata: + name: xero-invoices + description: A job's invoice raised in, or synced to, Xero (Standard), with its payments back. The firm's accounts stay in Xero. + annotations: + morphogen.dev/evidence: | + stated | material/tools.md:L12 | "| Accounts | Xero (Standard) | Dee, bookkeeper | deposits and final invoices; supplier bills |" +spec: {type: service, lifecycle: production, owner: group:default/office, system: fernhill, definition: "https://developer.xero.com/documentation/api/accounting/invoices"} +--- +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: fergus + description: Fergus, UK job management for trades (SaaS). Per user, from £45 a month on Pro. + annotations: + morphogen.dev/evidence: | + stated | https://fergus.com/uk/ | "Month-to-month per user, priced, so you add or remove users as the crew changes." + stated | https://fergus.com/uk/pricing/ | "Timesheet Users" "From £12 per month" + stated | https://fergus.com/uk/ | "The Fergus mobile app works seamlessly across Apple iOS and Android." + stated | https://fergus.com/uk/ | "Fergus talks to Xero and QuickBooks, syncing contacts, invoices and payments automatically" + stated | https://fergus.com/uk/ | "See what your team has on and easily assign jobs with the customisable calendar." +spec: + type: service + lifecycle: candidate + owner: group:default/directors + system: fernhill + providesApis: [xero-invoices] + morphogen: + fills: component:default/job-scheduling + licence: proprietary (SaaS subscription) + docs: {url: "https://fergus.com/uk/"} + evaluation: + need: the four needs in this file's header, and the three measures + method: >- + not run. Planned: a free trial; replay three past months of fitting weeks from jobs.csv (fit_planned_start, + fit_start, fit_end, worktop_material) with the four pairs, and check multi-day bookings, the quartz template + visit and the Xero invoice on sign-off. Cost: 5 full users at £45 plus 4 fitters, either full (£405 a month) + or as timesheet users from £12 (£273), if a timesheet user can see the schedule; the docs do not say. + result: not measured +--- +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: tradify + description: Tradify, job management for trades (SaaS). Per user, Pro £37 a month on the Xero App Store listing. + annotations: + morphogen.dev/evidence: | + stated | https://www.tradifyhq.com/pd/job_management_software_uk_v2 | "Tradify costs per user, per month." + stated | https://apps.xero.com/uk/app/tradify | "GBP 37.00 /month (billed monthly)" + stated | https://www.tradifyhq.com/pd/job_management_software_uk_v2 | "Yes! You can use Tradify on desktop, Android, and iOS devices." + stated | https://apps.xero.com/uk/app/tradify | "Automatically update your invoices, payments and credit notes between Xero and Tradify with 2-way sync." + stated | https://www.tradifyhq.com/pd/job_management_software_uk_v2 | "Our scheduling feature allows you to plan ahead with three different web views" +spec: + type: service + lifecycle: candidate + owner: group:default/directors + system: fernhill + providesApis: [xero-invoices] + morphogen: + fills: component:default/job-scheduling + licence: proprietary (SaaS subscription) + docs: {url: "https://www.tradifyhq.com/pd/job_management_software_uk_v2"} + evaluation: + need: the four needs in this file's header, and the three measures + method: >- + not run. Planned: the same replay as fergus, in its 14-day trial. Cost: 9 users at £37 (Pro), £333 a month; + the App Store page does not say per user, Tradify's own page does. SMS is extra. + result: not measured +--- +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: servicem8 + description: ServiceM8, job management (SaaS). A flat monthly fee by job volume with unlimited users; built for iOS first. + annotations: + morphogen.dev/evidence: | + stated | https://www.servicem8.com/uk/ | "Unlimited Users" + stated | https://www.servicem8.com/uk/ | "Optimised for Apple, Now Available for Android" + stated | https://www.servicem8.com/uk/xero-integration | "Payments received on the job automatically sync to Xero, and payments received in Xero sync back to ServiceM8." + stated | https://www.servicem8.com/uk/xero-integration | "Raise invoices in Xero from your iPhone, iPad or Online in two taps, ready to be reconciled." + stated | https://www.servicem8.com/uk/xero-integration | "Schedule jobs on the go. Changes automatically notify staff." +spec: + type: service + lifecycle: candidate + owner: group:default/directors + system: fernhill + providesApis: [xero-invoices] + morphogen: + fills: component:default/job-scheduling + licence: proprietary (SaaS subscription) + docs: {url: "https://www.servicem8.com/uk/"} + evaluation: + need: the four needs in this file's header, and the three measures + method: >- + not run. Planned: the same replay, on its free plan or Starter. Cost: £25 (Starter) or £59 (Growing) a month, + whatever the number of users; which plan depends on its job count per month (about 30 kitchens a year, each + several visits), not stated on the page read. To check first: whether the Android app gives fitters what they + need (third-party reviews call it limited). + result: not measured +--- +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: shared-calendar + description: >- + A Google Calendar per fitting pair in the Google Workspace the firm already pays for, with the quartz template + visit as its own event; the cheapest change, no Xero link. + annotations: + morphogen.dev/evidence: | + stated | material/tools.md:L7 | "| Email, calendar, files | Google Workspace (Business Starter, 5 accounts) | office, designers, directors | survey bookings in a shared calendar |" +spec: + type: service + lifecycle: candidate + owner: group:default/directors + system: fernhill + morphogen: + fills: component:default/job-scheduling + licence: proprietary (already subscribed) + evaluation: + need: the four needs in this file's header; it does not meet need 3 (no Xero link) + method: not run; the fitters have no Workspace accounts (5 accounts, none of them fitters), so they would need 4 more or shared calendars + result: not measured diff --git a/demos/fernhill/engagement/catalog/teams.yaml b/demos/fernhill/engagement/catalog/teams.yaml new file mode 100644 index 0000000..eea9730 --- /dev/null +++ b/demos/fernhill/engagement/catalog/teams.yaml @@ -0,0 +1,53 @@ +apiVersion: backstage.io/v1alpha1 +kind: Group +metadata: + name: directors + description: Sian Hollis (managing director) and Mark Hollis (workshop and fitting). They decide on changes. + annotations: + morphogen.dev/evidence: | + stated | material/overview.md:L21 | "Sian Hollis (managing director), Mark Hollis (workshop and fitting)" + stated | material/interview.md:L33 | "Me, with Mark for anything in the workshop or fitting. Dee runs the office and she should have a say on" +spec: {type: team, children: []} +--- +apiVersion: backstage.io/v1alpha1 +kind: Group +metadata: + name: office + description: Dee Grant (office manager), and a bookkeeper two days a month. Diary, orders, invoices. + annotations: + morphogen.dev/evidence: | + stated | material/overview.md:L22 | "Dee Grant (office manager: diary, orders, invoices); a bookkeeper two days a month, not on staff" +spec: {type: team, children: []} +--- +apiVersion: backstage.io/v1alpha1 +kind: Group +metadata: + name: design-sales + description: Owen and Priya. Survey, design, quote and follow-up; there is no separate surveyor. + annotations: + morphogen.dev/evidence: | + stated | material/overview.md:L23 | "Owen and Priya: survey, design, quote, follow-up" + stated | material/overview.md:L26 | "surveys are done by the designers" +spec: {type: team, children: []} +--- +apiVersion: backstage.io/v1alpha1 +kind: Group +metadata: + name: workshop + description: Two people making doors and frames and assembling cabinets. Not to be changed (the operator). + annotations: + morphogen.dev/evidence: | + stated | material/overview.md:L24 | "doors, frames, assembly, finishing" + stated | material/interview.md:L26 | "The workshop. We make our own doors and that's why people come to us." +spec: {type: team, children: []} +--- +apiVersion: backstage.io/v1alpha1 +kind: Group +metadata: + name: fitting + description: Two fitting pairs, on their own Android phones. + annotations: + morphogen.dev/evidence: | + stated | material/overview.md:L25 | "two fitting pairs" + stated | material/tools.md:L16 | "fitters use their own Android phones" +spec: {type: team, children: []} diff --git a/demos/fernhill/engagement/catalog/tools.yaml b/demos/fernhill/engagement/catalog/tools.yaml new file mode 100644 index 0000000..bc872f3 --- /dev/null +++ b/demos/fernhill/engagement/catalog/tools.yaml @@ -0,0 +1,65 @@ +# The tools, and the roles they play. A role is named so that another tool could play it. +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: job-scheduling + description: >- + The role: who fits which job, where and when, with the quartz templating visit, readable by the fitters on their + own Android phones. Played today by the workshop whiteboard and WhatsApp. + annotations: + morphogen.dev/evidence: | + stated | material/tools.md:L13 | "a whiteboard in the workshop, and photos of it" + stated | material/interview.md:L27 | "Whatever we do has to work on their" +spec: {type: role, lifecycle: production, owner: group:default/directors, system: fernhill, providesApis: [fitting-schedule, xero-invoices]} +--- +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: whiteboard + description: The workshop whiteboard (and photos of it, and one WhatsApp group per fitting pair). Fills job-scheduling. + annotations: + morphogen.dev/evidence: | + stated | material/tools.md:L13 | "| Workshop and fitting plan | a whiteboard in the workshop, and photos of it | Mark, fitters, Dee | |" +spec: + type: tool + lifecycle: production + owner: group:default/directors + system: fernhill + providesApis: [fitting-schedule] +--- +apiVersion: backstage.io/v1alpha1 +kind: API +metadata: + name: fitting-schedule + description: >- + For each job: the fitting pair, the address, the days, the quartz template date and the parts due. Inferred + from the process and the interview; to confirm with Mark. +spec: {type: process, lifecycle: production, owner: group:default/directors, system: fernhill, definition: "material/process.md steps 6, 8 and 9"} +--- +apiVersion: backstage.io/v1alpha1 +kind: API +metadata: + name: room-survey + description: A room's measurements, sketch and photos, as the designer brings them back. +spec: {type: process, lifecycle: production, owner: group:default/design-sales, system: fernhill, definition: "material/process.md step 2"} +--- +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: xero + description: Xero (Standard). Deposits, final invoices, supplier bills coded to jobs since January 2025. + annotations: + morphogen.dev/evidence: | + stated | material/tools.md:L12 | "| Accounts | Xero (Standard) | Dee, bookkeeper | deposits and final invoices; supplier bills |" + stated | material/jobs.md:L18 | "supplier bills coded to the job in Xero (the bookkeeper has done this since January 2025)" +spec: {type: service, owner: group:default/office, system: fernhill} +--- +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: sketchup + description: SketchUp Pro, two seats; drawings by hand, no cutting lists. + annotations: + morphogen.dev/evidence: | + stated | material/tools.md:L10 | "| Design | SketchUp Pro (2 seats) | designers | drawings by hand; no cutting lists |" +spec: {type: service, owner: group:default/design-sales, system: fernhill} diff --git a/demos/fernhill/engagement/cells/quote/bench.py b/demos/fernhill/engagement/cells/quote/bench.py new file mode 100644 index 0000000..b64405b --- /dev/null +++ b/demos/fernhill/engagement/cells/quote/bench.py @@ -0,0 +1,15 @@ +"""The workload: the calculator's cost for every completed job, one line each, `job_idcost`. + +Reads jobs.jsonl (each job's four inputs and its survey date, no actual costs) from MORPHOGEN_INPUTS. It computes +no score; score.py does, from the base, against actual costs this process cannot read. +""" + +import json +import os +from pathlib import Path + +import estimate + +for line in (Path(os.environ["MORPHOGEN_INPUTS"]) / "jobs.jsonl").read_text().splitlines(): + job = json.loads(line) + print(f"{job['job_id']}\t{estimate.cost(job):.2f}") diff --git a/demos/fernhill/engagement/cells/quote/estimate.py b/demos/fernhill/engagement/cells/quote/estimate.py new file mode 100644 index 0000000..fb85fe0 --- /dev/null +++ b/demos/fernhill/engagement/cells/quote/estimate.py @@ -0,0 +1,35 @@ +"""The quote calculator (`Quote calculator v7.xlsx`, material/quote-calculator.md) as code: a job's four inputs +in, its cost and price out. The constants are the sheet's cells, at their v7 values; the cell `quote-calculator` +may move the ones its `change` names, within bounds. MARGIN and LABOUR_RATE are the firm's, not the cell's. +""" + +CARCASS_STANDARD = 210.0 # B3, pounds per carcass +CARCASS_PREMIUM = 340.0 # B4 +WORKTOP_LAMINATE = 95.0 # B6, pounds per metre +WORKTOP_OAK = 210.0 # B7 +WORKTOP_QUARTZ = 420.0 # B8 +WORKTOP_WASTE = 0.25 # B10, one allowance for every material +HOURS_PER_CABINET = 5.5 # B12 +HOURS_PER_WORKTOP_M = 1.5 # B13 +FIXED_HOURS = 16.0 # B14 +LABOUR_RATE = 32.0 # B16, pounds per hour +MARGIN = 0.35 # B18, on cost + +RANGES = ("standard", "premium") +MATERIALS = ("laminate", "oak", "quartz") + + +def cost(job: dict) -> float: + """The cost of a job: `cabinets` (int), `range`, `worktop_material`, `worktop_m` (metres).""" + cabinets, rng, material, metres = job["cabinets"], job["range"], job["worktop_material"], job["worktop_m"] + if rng not in RANGES or material not in MATERIALS or cabinets < 1 or metres < 0: + raise ValueError(f"not a job the calculator prices: {job}") + carcass = CARCASS_PREMIUM if rng == "premium" else CARCASS_STANDARD + worktop = {"laminate": WORKTOP_LAMINATE, "oak": WORKTOP_OAK, "quartz": WORKTOP_QUARTZ}[material] + hours = cabinets * HOURS_PER_CABINET + metres * HOURS_PER_WORKTOP_M + FIXED_HOURS + return cabinets * carcass + metres * worktop * (1 + WORKTOP_WASTE) + hours * LABOUR_RATE + + +def price(job: dict) -> float: + """The quoted price: cost plus the margin, to the nearest ten pounds.""" + return round(cost(job) * (1 + MARGIN), -1) diff --git a/demos/fernhill/engagement/cells/quote/score.py b/demos/fernhill/engagement/cells/quote/score.py new file mode 100644 index 0000000..4504e17 --- /dev/null +++ b/demos/fernhill/engagement/cells/quote/score.py @@ -0,0 +1,24 @@ +"""The scorer: how far the calculator's costs (stdin, `job_idcost`) are from what the jobs cost. + +MORPHOGEN_PRIVATE names a directory outside the repository with actuals.json, {job_id: actual cost}, for one +split (held out for verdicts, search for probes). Actual cost = supplier bills coded to the job + timesheet hours +x the labour rate. Prints one JSON object: mape (mean absolute error as a share of actual cost), bias (mean +signed error; negative means costs under-estimated) and the share of jobs under-estimated. +""" + +import json +import os +import sys +from pathlib import Path + +actual = json.loads((Path(os.environ["MORPHOGEN_PRIVATE"]) / "actuals.json").read_text()) +errs = [] +for line in sys.stdin: + parts = line.split("\t") + if len(parts) == 2 and parts[0] in actual: + a = actual[parts[0]] + errs.append((float(parts[1]) - a) / a) +missing = len(actual) - len(errs) +n = len(errs) or 1 +print(json.dumps({"mape": sum(abs(e) for e in errs) / n + missing, "bias": sum(errs) / n, + "under_share": sum(e < 0 for e in errs) / n, "jobs": len(errs)})) diff --git a/demos/fernhill/engagement/cells/quote/tests/__init__.py b/demos/fernhill/engagement/cells/quote/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/demos/fernhill/engagement/cells/quote/tests/test_estimate.py b/demos/fernhill/engagement/cells/quote/tests/test_estimate.py new file mode 100644 index 0000000..6141a41 --- /dev/null +++ b/demos/fernhill/engagement/cells/quote/tests/test_estimate.py @@ -0,0 +1,42 @@ +"""The calculator's interface, `job-spec`: what a quote promises, whatever the constants are.""" + +import unittest + +import estimate + +JOB = {"cabinets": 14, "range": "standard", "worktop_material": "laminate", "worktop_m": 5.0} + + +class JobSpec(unittest.TestCase): + def test_price_is_cost_plus_35_percent_to_ten_pounds(self): + for job in (JOB, {**JOB, "range": "premium", "worktop_material": "quartz", "worktop_m": 7.3}): + p = estimate.price(job) + self.assertEqual(p % 10, 0) + self.assertAlmostEqual(p, estimate.cost(job) * 1.35, delta=5.0) + + def test_the_margin_is_the_firms(self): + self.assertEqual(estimate.MARGIN, 0.35) + + def test_more_cabinets_or_worktop_never_costs_less(self): + c = estimate.cost(JOB) + self.assertGreater(estimate.cost({**JOB, "cabinets": 15}), c) + self.assertGreater(estimate.cost({**JOB, "worktop_m": 5.5}), c) + + def test_premium_and_quartz_cost_more(self): + c = estimate.cost(JOB) + self.assertGreater(estimate.cost({**JOB, "range": "premium"}), c) + self.assertGreater(estimate.cost({**JOB, "worktop_material": "oak"}), c) + self.assertGreater(estimate.cost({**JOB, "worktop_material": "quartz"}), + estimate.cost({**JOB, "worktop_material": "oak"})) + + def test_a_job_it_cannot_price_is_refused(self): + for bad in ({**JOB, "range": "deluxe"}, {**JOB, "worktop_material": "granite"}, {**JOB, "cabinets": 0}): + with self.assertRaises(ValueError): + estimate.cost(bad) + + def test_extra_fields_are_ignored(self): + self.assertEqual(estimate.cost({**JOB, "job_id": "FK-1", "survey_date": "2026-01-05"}), estimate.cost(JOB)) + + +if __name__ == "__main__": + unittest.main() diff --git a/demos/fernhill/engagement/report.md b/demos/fernhill/engagement/report.md new file mode 100644 index 0000000..c594131 --- /dev/null +++ b/demos/fernhill/engagement/report.md @@ -0,0 +1,181 @@ +# Fernhill Kitchens: where the margin goes, and four projects to get it back + +*A demo engagement. Fernhill Kitchens, its people and its numbers are made up; the method, the measurements and +the verdict below are real runs of Morphogen on that material.* + +**For:** Sian Hollis, managing director. **From:** the material in `material/` (an overview, the office handbook, +the systems list, the quote calculator, the job sheet export of 121 jobs from January 2025, and a 50-minute +interview on 2026-11-21). **How:** the firm mapped as files (`catalog-info.yaml`, `catalog/`), every claim tied +to its source; the numbers computed by `analysis/baseline.py` (output: `analysis/baseline.txt`); the quote +calculator turned into a cell and judged by Morphogen on jobs it never saw. + +## In one paragraph + +The firm quotes 35% on cost and gets 16%. The quote calculator's costs are too low on every one of the 50 +completed jobs, by a median 14%, because its constants date from March 2023. That is about **£84,000 of +margin over those 50 jobs, about £53,000 a year**. Corrected constants, found by search and checked on 19 jobs +held back from that search, bring the calculator's error from 12.4% to 3.4%. Separately, quotes take a median +9 days, and the job sheet shows the win rate falling with every week a quote waits: 80% when the quote goes +within 5 days, 32% at 10 to 14 days, none of 16 at 15 days or more. Fitting starts slip on half the jobs and +the final invoice goes a median 12.5 days after the fit. The four projects below are in the order we would do them. + +## What we found + +| Measure | Now | Source | +| --- | --- | --- | +| Markup on cost, intended | 35% | `material/quote-calculator.md` (B18); the interview | +| Markup on cost, realised (median, 50 completed jobs) | 16.3% | `analysis/baseline.txt` | +| Jobs whose cost the calculator under-estimated | 50 of 50 | `analysis/baseline.txt` | +| Margin short of the intended, 50 jobs fitted March 2025 to October 2026 | £83,576 | `analysis/baseline.txt` | +| Survey to quote, median | 9 days (17% within 5) | `analysis/baseline.txt` | +| Win rate by days to quote: 0-5 / 6-9 / 10-14 / 15+ | 80% / 57% / 32% / 0% (n = 20 / 44 / 34 / 16) | `analysis/baseline.txt` | +| Lost jobs where the customer said they went with a quicker quote | 15 of 62 | `analysis/baseline.txt` | +| Fitting starts later than first planned | 48% (median 5.5 days late when late) | `analysis/baseline.txt` | +| Fit signed off to final invoice, median | 12.5 days | `analysis/baseline.txt` | +| Jobs with remade cabinets | 6 of 50 (12%), 5 from survey measurement | `analysis/baseline.txt` | + +One stated figure the data does not bear out: remakes were put at "one job in five" in the interview; the job +sheet shows one in eight. Worth knowing before spending on it. + +What must not change (the interview): the workshop and its doors; the 35% margin; anything the fitters use must +work on their own Android phones and be simple; no new hire to run a system; software "a few hundred a month if +it earns it"; a project that pays back inside a year. + +## The map + +The firm as files: the System, five teams, the steps a job goes through, the tools behind them, the interfaces +work is handed on by, and the roles a tool plays (so another tool could play them). Rendered by Morphogen +(`analysis/map.mmd`): + +```mermaid +flowchart LR + subgraph c_fernhill["fernhill"] + c_design["design"] + c_final_invoice["final-invoice"] + c_fit["fit"] + c_orders["orders"] + c_quote["quote"] + c_quote_calculator["quote-calculator"] + c_survey["survey"] + c_whiteboard["whiteboard"] + end + outside(["outside"]) + c_whiteboard -->|"fitting-schedule"| c_fit + i_job_spec(("job-spec")) + c_design --> i_job_spec + c_quote_calculator --> i_job_spec + i_job_spec --> c_orders + i_job_spec --> c_quote + outside -->|"resource:sketchup"| c_design + outside -->|"resource:xero"| c_final_invoice + c_survey -->|"room-survey"| c_design +``` + +Of six interfaces, one (`job-spec`, the calculator's) has tests; the rest are named, not yet enforced. + +## Project 1: a quote calculator that knows what jobs cost + +**What changes.** The calculator's cost constants, which have not moved since March 2023, while carcass prices +rose in summer 2025 (the interview) and labour per cabinet was under-counted. Then a quarterly check: the +calculator's cost for each completed job against what the job cost (supplier bills coded to the job in Xero, +timesheet hours), which the firm already records and nobody compares. + +**The target and its measure.** The calculator's cost within 5% of the actual, on average, on completed jobs it +was not fitted to. Measured by `cells/quote/score.py`: the mean absolute error as a share of actual cost. + +**Where it stands.** The calculator is a cell (`catalog/quote.yaml`): its formula in `cells/quote/estimate.py`, +the six cost constants free to move within bounds, the margin and the labour rate held fixed (they are the +firm's decisions), and interface tests that any version must pass (price = cost + 35% to £10; more cabinets or +worktop never cost less; premium and quartz cost more; jobs it cannot price are refused). Morphogen searched the +constants on 31 completed jobs and judged the best on 19 held back: + +| | v7 sheet | Tuned | | +| --- | --- | --- | --- | +| Mean cost error, 19 held-out jobs | 12.4% | **3.4%** | judged: **pass**, 7 runs, sign test p = 0.008, in a Podman sandbox | +| Premium carcass | £340 | £402.50 | | +| Hours per cabinet | 5.5 | 7.75 | | +| Other constants | | unchanged | | + +**Read the tuned values as a fit, not as prices.** The search moved two constants to absorb every error, +including the Standard carcass price rise it left alone. The project should therefore (1) enter Lindale's and +Stonecraft's current prices from their price lists, (2) give each worktop material its own waste allowance (the +sheet has one for all three), and (3) fit only the labour and waste constants to completed jobs. Each of these is +a change to the cell, judged the same way before it is used. + +**What it is worth.** Up to about £53,000 a year at the current volume, the margin the firm intends to charge and +does not. Not all of it will be kept: quoted prices rise by about 15% on the same jobs, and some customers will +go elsewhere. The win rate after the change is the second measure to watch. + +**Cost and risk.** About two days: the prices entered, the sheet changed and checked against the cell, the +quarterly comparison set up as a saved report. Risk: higher quotes cost jobs (watch the win rate monthly; the +margin is Sian's to hold, the report only shows what it costs); the fit is only as good as the job coding in Xero +(started January 2025). + +## Project 2: quotes in three days + +**What changes.** The quote stops waiting for the designer to rebuild it by hand. With project 1's calculator +trusted, the designer enters the four inputs during or right after the survey (on the tablet or phone they +already carry) and the quote PDF is filled from the template; the design rounds go on after the price is agreed in +principle, not before. + +**The target and its measure.** Median survey-to-quote 3 days (now 9), and at least 80% within 5 (now 17%), from +the job sheet's `survey_date` and `quote_sent_date`. Then the win rate by days to quote, monthly. + +**What it is worth.** The job sheet shows the link, not its cause: busy months make quotes slow and may lose jobs +for other reasons too. 15 of the 62 lost customers said they went with a quicker quote. If a third of those +jobs had been won, that is 5 kitchens, about £60,000 of work over 21 months at the average job's £12,400. The +first month of the trial will say whether the win rate moves. + +**Options.** Not catalogued yet: the calculator on a phone (the sheet in Google Sheets, or the quote module of +the scheduling tool chosen in project 3, since all three options quote). Decide after project 3's trial. + +**Cost and risk.** Low: a change to how the designers work, a day to set up. Risk: a price given before the +design rounds needs a stated margin for changes, and the designers have to agree to it. + +## Project 3: a schedule the fitters can see + +**What changes.** The whiteboard, its photos and the WhatsApp groups give way to one schedule: each job's fitting +pair, address, days, the quartz template visit, the parts due, on the fitters' phones; the final invoice raised in +Xero the day the job is signed off, from the same tool. + +**The target and its measure.** Fitting starts that slip: under 20% (now 48%). Double-bookings: none (two this +year, the interview). Sign-off to final invoice: 2 days (now a median 12.5); the 60% balance averages £7,500 a job. + +**Options catalogued** (`catalog/scheduling.yaml`, each with what its vendor's page says, quoted): + +| Option | Price for 9 people | Android | Xero | Multi-day fitting schedule | +| --- | --- | --- | --- | --- | +| Fergus | £405 a month, or £273 if fitters can be timesheet users (to check) | stated | invoices, payments, contacts | not stated: to test | +| Tradify | £333 a month (Pro, £37 a user) | stated | invoices, payments, credit notes, 2-way | not stated: to test | +| ServiceM8 | £25 or £59 a month, any number of users, by job volume | stated, iOS first | invoices, payments | not stated: to test | +| Shared Google calendars | already paid for, plus 4 accounts | yes | none | yes, by hand | +| Ruled out: anything self-hosted | | | | "We would rather not run a server" | + +None was measured yet. **The trial, before choosing:** each of the three in its free trial, replaying three past +months of fitting weeks from the job sheet with the two pairs, and checking a multi-day booking, the quartz +template visit, the fitter's view on an Android phone and the invoice reaching Xero. Mark and one fitting pair +judge the phone side; Dee the office side. We would start with Tradify or Fergus (Android stated plainly, per-user +pricing inside the budget) and keep ServiceM8 if its Android app passes the fitters. + +**Cost and risk.** £250 to £400 a month; about a week of Dee's time to move the jobs over and a morning per +fitting pair to learn it. Risk: the fitters do not use it, so the trial runs with them, and the whiteboard stays +until a month of fitting has gone through the new tool without a miss. + +## Project 4: fewer remakes (smaller, later) + +6 of 50 completed jobs had cabinets remade, 5 because of survey measurements. A laser measure that records into +the survey (instead of a tape and pencil), and a check of the drawing against it before ordering, would address +most of them. Worth about a day of someone's time per remake; catalogue the measuring tools once projects 1 to 3 +are under way. + +## What we did not look at + +Supplier terms, the workshop's own efficiency (off limits by choice), marketing, and the year's accounts. Six +interfaces were named and one tested; the fitting schedule's interface (`fitting-schedule`) is inferred and to be +confirmed with Mark. + +## How to check this report + +Every claim in the map carries its source as `trust | file:line or URL | "quote"`. `python +analysis/baseline.py material/jobs.csv` reproduces every number in the table. The verdict is in Morphogen's +evidence log (`morphogen evidence`); `morphogen status` shows the cell and its pass. diff --git a/demos/fernhill/making/make_jobs.py b/demos/fernhill/making/make_jobs.py new file mode 100644 index 0000000..57378d2 --- /dev/null +++ b/demos/fernhill/making/make_jobs.py @@ -0,0 +1,134 @@ +"""Write the made-up firm's job log: material/jobs.csv. + + python making/make_jobs.py + +Fernhill Kitchens does not exist. This script is how its job log was made, kept so the demo can be +rebuilt and checked; it is not part of the firm's material, and the scripted engagement never +copies it (it holds the true costs the engagement has to discover). Deterministic: one seed. + +What it plants, for the engagement to find: +- the quote spreadsheet's constants (material/quote-calculator.md) are out of date: carcass prices + rose in June 2025, labour per cabinet is under-counted, and one worktop waste allowance is used for + every material, so quoted margins drift and some jobs lose money; +- quotes are slow (survey to quote), and the slower the quote the likelier the job is lost; +- remakes follow survey measurement errors; +- final invoices go out late after a fit ends. +""" + +import csv +import random +from datetime import date, timedelta +from pathlib import Path + +HERE = Path(__file__).resolve().parent +OUT = HERE.parent / "material" / "jobs.csv" +SEED = 20261124 + +LABOUR_RATE = 32.0 +# The truth, which the spreadsheet does not know. +CARCASS = {"standard": (205.0, 236.0), "premium": (352.0, 371.0)} # before and after 2025-06-01 +WORKTOP = {"laminate": 95.0, "oak": 210.0, "quartz": 420.0} # per metre, as the sheet has it +WASTE = {"laminate": 0.10, "oak": 0.16, "quartz": 0.21} +HOURS_PER_CABINET = {"standard": 6.9, "premium": 8.4} +HOURS_PER_WORKTOP_M = {"laminate": 1.1, "oak": 1.8, "quartz": 2.2} +FIXED_HOURS = 21.0 +PRICE_RISE = date(2025, 6, 1) + +# The spreadsheet, as material/quote-calculator.md describes it. +SHEET = dict(carcass={"standard": 210.0, "premium": 340.0}, waste=0.25, hpc=5.5, hpw=1.5, + fixed=16.0, margin=0.35) + +DESIGNERS = ["Owen", "Priya"] +SOURCES = ["website", "referral", "showroom", "houzz", "repeat"] +LOST_REASONS = ["price", "went with a quicker quote", "project postponed", "chose a national chain", + "no reply", "went with a quicker quote", "price"] + + +def sheet_cost(cabinets: int, rng: str, worktop_m: float, material: str) -> float: + s = SHEET + return (cabinets * s["carcass"][rng] + + worktop_m * WORKTOP[material] * (1 + s["waste"]) + + (cabinets * s["hpc"] + worktop_m * s["hpw"] + s["fixed"]) * LABOUR_RATE) + + +def main() -> None: + r = random.Random(SEED) + rows = [] + day = date(2025, 1, 6) + n = 0 + while day < date(2026, 10, 1): + day += timedelta(days=r.choice([2, 3, 4, 5, 6, 7, 8])) + n += 1 + job = f"FK-{1000 + n}" + cabinets = r.randint(8, 26) + rng = "premium" if r.random() < 0.35 else "standard" + material = r.choices(["laminate", "oak", "quartz"], [0.45, 0.2, 0.35])[0] + worktop_m = round(r.uniform(2.4, 9.5), 1) + survey = day + timedelta(days=r.randint(3, 12)) + designer = r.choice(DESIGNERS) + # Quotes wait for Owen or Priya to rebuild the sheet by hand; busier months are slower. + busy = 1.0 + 0.5 * (survey.month in (3, 4, 9, 10)) + lag = max(2, round(r.lognormvariate(2.05, 0.45) * busy)) + quote_sent = survey + timedelta(days=lag) + cost = sheet_cost(cabinets, rng, worktop_m, material) + price = round(cost * (1 + SHEET["margin"]), -1) + row = dict(job_id=job, enquiry_date=day, source=r.choice(SOURCES), designer=designer, + survey_date=survey, quote_sent_date=quote_sent, cabinets=cabinets, range=rng, + worktop_material=material, worktop_m=worktop_m, quoted_price=price) + p_win = max(0.08, 0.78 - 0.035 * lag) + if quote_sent > date(2026, 9, 20): + row.update(outcome="pending") + rows.append(row) + continue + if r.random() >= p_win: + row.update(outcome="lost", lost_reason=r.choice(LOST_REASONS if lag > 9 else LOST_REASONS[:1] + LOST_REASONS[2:])) + rows.append(row) + continue + deposit = quote_sent + timedelta(days=r.randint(2, 20)) + planned = deposit + timedelta(days=r.randint(28, 56)) + slip = 0 if r.random() < 0.55 else r.randint(1, 12) + fit_start = planned + timedelta(days=slip) + fit_days = max(3, round(cabinets / 4 + r.uniform(0, 3))) + fit_end = fit_start + timedelta(days=fit_days) + carcass = CARCASS[rng][0 if survey < PRICE_RISE else 1] + materials = (cabinets * carcass * r.uniform(0.97, 1.03) + + worktop_m * WORKTOP[material] * (1 + WASTE[material]) * r.uniform(0.95, 1.06)) + hours = (cabinets * HOURS_PER_CABINET[rng] + worktop_m * HOURS_PER_WORKTOP_M[material] + + FIXED_HOURS) * r.lognormvariate(0, 0.07) + # A survey measurement error means remade cabinets: their materials and hours again. + remakes = 0 + if r.random() < 0.22: + remakes = r.choice([1, 1, 1, 2, 2, 3]) + materials += remakes * carcass * 1.1 + hours += remakes * HOURS_PER_CABINET[rng] * 1.3 + fit_end += timedelta(days=r.randint(3, 9)) + invoice = fit_end + timedelta(days=r.randint(2, 24)) + paid = invoice + timedelta(days=r.randint(7, 38)) + status = "complete" + if fit_end > date(2026, 10, 31): + status = "in progress" + row.update(outcome="won", deposit_date=deposit, fit_planned_start=planned) + if status == "complete": + row.update(fit_start=fit_start, fit_end=fit_end, remade_cabinets=remakes, + remake_cause="survey measurement" if remakes and r.random() < 0.8 else ("damaged in delivery" if remakes else ""), + actual_materials=round(materials, 2), actual_labour_hours=round(hours, 1), + final_invoice_date=invoice, + paid_date=paid if paid <= date(2026, 11, 20) else "") + else: + row.update(fit_start=fit_start if fit_start <= date(2026, 11, 20) else "") + rows.append(row) + fields = ["job_id", "enquiry_date", "source", "designer", "survey_date", "quote_sent_date", + "cabinets", "range", "worktop_material", "worktop_m", "quoted_price", "outcome", + "lost_reason", "deposit_date", "fit_planned_start", "fit_start", "fit_end", + "remade_cabinets", "remake_cause", "actual_materials", "actual_labour_hours", + "final_invoice_date", "paid_date"] + with open(OUT, "w", newline="") as f: + w = csv.DictWriter(f, fieldnames=fields) + w.writeheader() + for row in rows: + w.writerow({k: row.get(k, "") for k in fields}) + print(f"{len(rows)} jobs -> {OUT}") + + +if __name__ == "__main__": + main() diff --git a/demos/fernhill/material/interview.md b/demos/fernhill/material/interview.md new file mode 100644 index 0000000..ccad4b2 --- /dev/null +++ b/demos/fernhill/material/interview.md @@ -0,0 +1,61 @@ +# Interview with Sian Hollis, managing director (2026-11-21, 50 minutes, by video) + +*(Made up for Morphogen's demo engagement. Sian Hollis is a made-up person. Transcript tidied; the interviewer's +questions in bold.)* + +**What would make this engagement worth it for you?** + +Honestly, I want to know where the money goes. We're busier than we've ever been and the bank balance doesn't +show it. Last year we turned over four hundred thousand and I took home less than in 2022. Something's leaking and I can't see +what. + +**Where do you suspect?** + +Quotes, partly. Owen's calculator is the same one we've had for years. Prices have gone up, Lindale put their +carcasses up last summer, I know that. Whether Owen changed the sheet I couldn't tell you. I think he didn't. +And I'm sure we lose jobs because we're slow to quote. People tell us. "Oh, we went with someone who got back to +us." The designers are doing surveys, designs, quotes and chasing, all of it, and the quote is the bit that waits. + +**How long should a quote take?** + +The handbook says five working days. I'd love three. A national chain will do it in the showroom on the day, +but that's a different kind of kitchen. + +**What must not change?** + +The workshop. We make our own doors and that's why people come to us. And I won't have the fitters on +something they hate; they're the face of the firm in people's houses. Whatever we do has to work on their +Android phones and it has to be simple. Also the margin: 35% on cost is the number the bank and I agreed and I +want to actually get it, not change it. + +**Who decides on changes?** + +Me, with Mark for anything in the workshop or fitting. Dee runs the office and she should have a say on +anything she'll be typing into. We don't have an IT person. Owen is the nearest thing. + +**Anything about fitting?** + +The whiteboard works until it doesn't. Twice this year two pairs turned up at the same house and one job had +nobody. Quartz is a pain: Stonecraft need ten days after templating, so fitting slips if anyone forgets to book +the template. And remakes. Owen and Priya measure with a tape and a laser and a pencil, and every so often a +cabinet's wrong and we make it again. Mark says it's one job in five. That's a day of somebody's time, every +time. + +**And the money coming in?** + +Dee invoices when the fitter tells her it's signed off. Sometimes that's the same day, sometimes it's a fortnight +because nobody told her. People pay in a few weeks. I'd like that tightened but it's not the big thing. + +**What would "better" look like in a year?** + +Quotes out in three days. The margin we think we're charging is the one we get. Fewer remakes. And I stop +finding out about problems from a customer. + +**Budget?** + +For software, a few hundred a month if it earns it. For a project, if it pays back inside a year, I'll find it. +I'd rather not hire anyone just to run a system. + +**Anything off limits for us to look at?** + +No. You've got the job sheet. The accounts are with the bookkeeper; ask Dee if you need anything from Xero. diff --git a/demos/fernhill/material/jobs.csv b/demos/fernhill/material/jobs.csv new file mode 100644 index 0000000..dcf203d --- /dev/null +++ b/demos/fernhill/material/jobs.csv @@ -0,0 +1,122 @@ +job_id,enquiry_date,source,designer,survey_date,quote_sent_date,cabinets,range,worktop_material,worktop_m,quoted_price,outcome,lost_reason,deposit_date,fit_planned_start,fit_start,fit_end,remade_cabinets,remake_cause,actual_materials,actual_labour_hours,final_invoice_date,paid_date +FK-1001,2025-01-14,houzz,Priya,2025-01-19,2025-01-27,13,standard,laminate,7.2,9090.0,won,,2025-02-16,2025-03-23,2025-03-23,2025-03-28,0,,3466.51,147.0,2025-04-01,2025-04-12 +FK-1002,2025-01-20,showroom,Owen,2025-01-28,2025-02-10,16,standard,laminate,6.3,10450.0,won,,2025-03-02,2025-04-03,2025-04-03,2025-04-07,0,,3882.52,155.4,2025-04-21,2025-05-28 +FK-1003,2025-01-25,website,Owen,2025-01-30,2025-02-08,24,standard,laminate,8.5,15110.0,won,,2025-02-23,2025-04-04,2025-04-04,2025-04-19,1,survey measurement,6075.41,194.7,2025-05-05,2025-06-01 +FK-1004,2025-02-02,houzz,Owen,2025-02-14,2025-02-22,20,standard,quartz,6.9,16450.0,lost,price,,,,,,,,,, +FK-1005,2025-02-05,referral,Priya,2025-02-12,2025-02-17,9,standard,laminate,4.8,6460.0,lost,project postponed,,,,,,,,,, +FK-1006,2025-02-10,showroom,Priya,2025-02-13,2025-03-02,16,premium,quartz,4.4,15240.0,lost,went with a quicker quote,,,,,,,,,, +FK-1007,2025-02-17,website,Owen,2025-02-23,2025-03-06,8,standard,laminate,3.8,5720.0,lost,no reply,,,,,,,,,, +FK-1008,2025-02-20,showroom,Priya,2025-03-02,2025-03-08,9,standard,laminate,6.9,6930.0,won,,2025-03-12,2025-05-02,2025-05-08,2025-05-13,0,,2583.25,94.8,2025-06-05,2025-07-01 +FK-1009,2025-02-26,referral,Owen,2025-03-09,2025-03-16,12,standard,laminate,9.5,9080.0,lost,chose a national chain,,,,,,,,,, +FK-1010,2025-03-02,houzz,Priya,2025-03-08,2025-03-15,24,standard,quartz,8.4,19700.0,lost,chose a national chain,,,,,,,,,, +FK-1011,2025-03-06,website,Priya,2025-03-09,2025-03-26,23,standard,laminate,8.6,14610.0,lost,went with a quicker quote,,,,,,,,,, +FK-1012,2025-03-10,showroom,Priya,2025-03-20,2025-03-30,14,standard,laminate,6.7,9490.0,lost,went with a quicker quote,,,,,,,,,, +FK-1013,2025-03-14,showroom,Owen,2025-03-26,2025-04-06,23,standard,quartz,2.5,14610.0,won,,2025-04-20,2025-06-07,2025-06-07,2025-06-14,0,,5969.26,186.6,2025-06-29,2025-07-08 +FK-1014,2025-03-20,referral,Priya,2025-03-30,2025-04-13,23,premium,oak,8.4,20230.0,lost,price,,,,,,,,,, +FK-1015,2025-03-27,referral,Priya,2025-04-08,2025-04-16,24,standard,quartz,6.5,18230.0,won,,2025-04-28,2025-05-31,2025-05-31,2025-06-06,0,,8145.65,222.1,2025-06-20,2025-07-17 +FK-1016,2025-04-03,referral,Priya,2025-04-08,2025-04-16,9,standard,laminate,4.5,6390.0,lost,no reply,,,,,,,,,, +FK-1017,2025-04-09,website,Priya,2025-04-16,2025-04-26,11,premium,laminate,5.8,9660.0,lost,went with a quicker quote,,,,,,,,,, +FK-1018,2025-04-15,showroom,Priya,2025-04-21,2025-05-09,15,standard,quartz,5.7,12920.0,lost,price,,,,,,,,,, +FK-1019,2025-04-17,repeat,Priya,2025-04-27,2025-05-05,18,premium,oak,7.9,16540.0,won,,2025-05-12,2025-07-01,2025-07-04,2025-07-13,3,survey measurement,9513.58,235.6,2025-07-26,2025-08-06 +FK-1020,2025-04-22,houzz,Owen,2025-04-28,2025-05-07,21,premium,quartz,8.7,22050.0,lost,no reply,,,,,,,,,, +FK-1021,2025-04-25,houzz,Priya,2025-05-04,2025-05-11,13,premium,laminate,2.5,10310.0,won,,2025-05-13,2025-06-16,2025-06-17,2025-06-21,0,,4741.1,139.2,2025-06-23,2025-07-02 +FK-1022,2025-04-30,showroom,Priya,2025-05-06,2025-05-22,22,standard,laminate,2.6,12740.0,lost,price,,,,,,,,,, +FK-1023,2025-05-06,website,Priya,2025-05-11,2025-05-24,24,premium,quartz,7.8,23440.0,lost,went with a quicker quote,,,,,,,,,, +FK-1024,2025-05-09,repeat,Owen,2025-05-12,2025-05-17,22,standard,laminate,8.3,14020.0,won,,2025-05-29,2025-07-07,2025-07-07,2025-07-15,0,,5450.51,197.2,2025-07-31,2025-08-09 +FK-1025,2025-05-13,houzz,Priya,2025-05-18,2025-05-27,10,standard,laminate,6.8,7430.0,won,,2025-06-15,2025-07-15,2025-07-15,2025-07-18,0,,2809.69,89.3,2025-07-22,2025-08-16 +FK-1026,2025-05-17,referral,Owen,2025-05-26,2025-06-05,12,premium,laminate,4.1,9970.0,won,,2025-06-09,2025-08-01,2025-08-01,2025-08-05,0,,4626.06,122.4,2025-08-11,2025-08-31 +FK-1027,2025-05-24,showroom,Priya,2025-05-27,2025-06-16,9,standard,laminate,4.3,6350.0,lost,no reply,,,,,,,,,, +FK-1028,2025-05-30,houzz,Owen,2025-06-04,2025-06-13,12,standard,oak,8.7,10590.0,won,,2025-06-28,2025-07-31,2025-08-07,2025-08-11,0,,4839.32,115.7,2025-08-17,2025-08-29 +FK-1029,2025-06-07,repeat,Priya,2025-06-12,2025-06-22,23,standard,laminate,7.9,14450.0,won,,2025-07-12,2025-09-03,2025-09-03,2025-09-10,0,,6398.59,180.3,2025-09-28,2025-10-28 +FK-1030,2025-06-13,website,Owen,2025-06-21,2025-06-26,21,standard,laminate,5.2,12800.0,won,,2025-07-16,2025-08-25,2025-08-28,2025-09-04,0,,5442.72,184.7,2025-09-19,2025-09-27 +FK-1031,2025-06-19,showroom,Owen,2025-06-22,2025-07-02,20,standard,quartz,7.6,16990.0,lost,price,,,,,,,,,, +FK-1032,2025-06-26,repeat,Owen,2025-07-02,2025-07-07,9,standard,quartz,6.8,10640.0,lost,chose a national chain,,,,,,,,,, +FK-1033,2025-07-03,showroom,Priya,2025-07-13,2025-07-18,20,standard,laminate,9.0,13140.0,won,,2025-08-01,2025-09-14,2025-09-14,2025-09-20,0,,5540.6,168.0,2025-09-25,2025-10-21 +FK-1034,2025-07-10,houzz,Priya,2025-07-17,2025-07-26,10,standard,quartz,9.3,13100.0,lost,chose a national chain,,,,,,,,,, +FK-1035,2025-07-12,website,Priya,2025-07-16,2025-07-28,14,standard,quartz,2.6,10000.0,won,,2025-08-17,2025-09-15,2025-09-15,2025-09-20,0,,4683.44,127.6,2025-10-06,2025-11-09 +FK-1036,2025-07-19,repeat,Priya,2025-07-24,2025-07-29,19,standard,quartz,5.5,14850.0,lost,price,,,,,,,,,, +FK-1037,2025-07-21,repeat,Priya,2025-08-01,2025-08-08,23,premium,quartz,5.0,20580.0,won,,2025-08-27,2025-10-15,2025-10-15,2025-10-28,2,damaged in delivery,11939.99,268.9,2025-11-03,2025-11-10 +FK-1038,2025-07-28,referral,Priya,2025-08-01,2025-08-05,13,standard,laminate,4.3,8430.0,won,,2025-08-15,2025-10-02,2025-10-12,2025-10-23,1,survey measurement,3837.93,124.3,2025-11-02,2025-11-27 +FK-1039,2025-07-30,houzz,Owen,2025-08-04,2025-08-11,11,standard,quartz,3.2,8900.0,lost,went with a quicker quote,,,,,,,,,, +FK-1040,2025-08-07,referral,Priya,2025-08-16,2025-08-23,13,standard,quartz,5.5,11720.0,won,,2025-09-01,2025-10-14,2025-10-14,2025-10-19,0,,5665.89,110.9,2025-11-11,2025-12-19 +FK-1041,2025-08-15,showroom,Priya,2025-08-26,2025-09-05,11,standard,laminate,2.7,7030.0,won,,2025-09-07,2025-10-08,2025-10-08,2025-10-12,0,,2841.01,87.6,2025-10-28,2025-11-07 +FK-1042,2025-08-20,website,Owen,2025-08-25,2025-08-29,24,standard,quartz,4.8,16910.0,won,,2025-09-06,2025-10-27,2025-10-29,2025-11-04,0,,8351.47,194.0,2025-11-22,2025-12-11 +FK-1043,2025-08-23,houzz,Owen,2025-08-31,2025-09-07,12,standard,quartz,3.2,9420.0,won,,2025-09-24,2025-10-24,2025-10-31,2025-11-09,3,survey measurement,5216.81,141.0,2025-11-24,2025-12-07 +FK-1044,2025-08-30,repeat,Priya,2025-09-10,2025-09-22,13,standard,laminate,8.7,9420.0,lost,went with a quicker quote,,,,,,,,,, +FK-1045,2025-09-03,repeat,Owen,2025-09-10,2025-09-20,21,standard,laminate,7.6,13350.0,lost,price,,,,,,,,,, +FK-1046,2025-09-06,houzz,Owen,2025-09-15,2025-09-23,18,standard,oak,9.4,14010.0,won,,2025-10-05,2025-11-21,2025-11-27,2025-12-02,0,,6570.33,178.7,2025-12-11,2026-01-14 +FK-1047,2025-09-12,houzz,Priya,2025-09-19,2025-09-27,16,premium,laminate,6.1,13210.0,won,,2025-10-04,2025-11-27,2025-11-27,2025-12-03,0,,6401.29,181.5,2025-12-14,2026-01-15 +FK-1048,2025-09-18,repeat,Owen,2025-09-25,2025-10-02,17,standard,oak,6.0,12060.0,won,,2025-10-15,2025-12-09,2025-12-14,2025-12-19,0,,5516.27,150.2,2026-01-06,2026-02-02 +FK-1049,2025-09-23,referral,Priya,2025-10-03,2025-10-16,20,standard,quartz,3.9,14130.0,lost,went with a quicker quote,,,,,,,,,, +FK-1050,2025-09-27,repeat,Owen,2025-10-07,2025-10-22,11,standard,quartz,9.5,13770.0,lost,no reply,,,,,,,,,, +FK-1051,2025-10-02,repeat,Priya,2025-10-10,2025-10-18,18,standard,oak,5.6,12420.0,lost,price,,,,,,,,,, +FK-1052,2025-10-05,website,Owen,2025-10-09,2025-10-15,23,standard,oak,4.9,14730.0,lost,price,,,,,,,,,, +FK-1053,2025-10-08,repeat,Priya,2025-10-15,2025-10-24,9,premium,oak,7.7,10190.0,lost,price,,,,,,,,,, +FK-1054,2025-10-14,showroom,Priya,2025-10-24,2025-11-08,26,standard,laminate,5.8,15550.0,lost,no reply,,,,,,,,,, +FK-1055,2025-10-22,houzz,Owen,2025-10-28,2025-11-12,15,standard,oak,5.2,10690.0,lost,project postponed,,,,,,,,,, +FK-1056,2025-10-24,showroom,Priya,2025-11-01,2025-11-05,25,standard,laminate,7.6,15430.0,won,,2025-11-15,2026-01-07,2026-01-11,2026-01-18,0,,6717.35,224.4,2026-02-07,2026-02-27 +FK-1057,2025-10-30,website,Priya,2025-11-06,2025-11-14,19,standard,laminate,9.2,12660.0,lost,chose a national chain,,,,,,,,,, +FK-1058,2025-11-05,website,Priya,2025-11-12,2025-11-24,10,premium,laminate,3.9,8540.0,lost,price,,,,,,,,,, +FK-1059,2025-11-09,referral,Priya,2025-11-21,2025-12-03,24,standard,laminate,8.1,15020.0,lost,went with a quicker quote,,,,,,,,,, +FK-1060,2025-11-14,houzz,Priya,2025-11-18,2025-11-26,18,standard,laminate,9.2,12140.0,lost,no reply,,,,,,,,,, +FK-1061,2025-11-20,houzz,Owen,2025-12-01,2025-12-12,14,standard,laminate,7.5,9670.0,won,,2025-12-21,2026-02-14,2026-02-14,2026-02-20,0,,4124.18,125.5,2026-03-03,2026-03-28 +FK-1062,2025-11-24,referral,Owen,2025-12-05,2025-12-15,22,premium,oak,3.8,17610.0,won,,2025-12-29,2026-01-31,2026-02-10,2026-02-17,0,,9223.87,245.5,2026-03-06,2026-04-11 +FK-1063,2025-11-29,referral,Priya,2025-12-03,2025-12-08,25,standard,quartz,3.0,16040.0,won,,2025-12-12,2026-02-02,2026-02-08,2026-02-16,0,,7643.7,199.4,2026-02-22,2026-03-02 +FK-1064,2025-12-03,referral,Priya,2025-12-15,2025-12-21,14,standard,quartz,5.3,12090.0,won,,2026-01-05,2026-02-26,2026-02-26,2026-03-04,0,,6077.1,141.3,2026-03-11,2026-03-28 +FK-1065,2025-12-09,repeat,Priya,2025-12-14,2025-12-19,12,premium,oak,2.5,10100.0,won,,2025-12-27,2026-02-15,2026-02-20,2026-02-25,0,,4940.73,139.5,2026-03-03,2026-03-17 +FK-1066,2025-12-13,houzz,Priya,2025-12-17,2025-12-21,17,premium,laminate,3.7,13370.0,lost,went with a quicker quote,,,,,,,,,, +FK-1067,2025-12-19,referral,Owen,2025-12-26,2026-01-06,26,premium,oak,7.7,22030.0,lost,price,,,,,,,,,, +FK-1068,2025-12-22,showroom,Owen,2025-12-26,2025-12-28,26,premium,quartz,9.2,25920.0,won,,2026-01-06,2026-02-17,2026-03-01,2026-03-08,0,,14226.44,275.4,2026-03-24,2026-04-01 +FK-1069,2025-12-29,showroom,Priya,2026-01-09,2026-01-14,12,premium,oak,7.1,12030.0,won,,2026-01-24,2026-03-16,2026-03-16,2026-03-22,0,,6052.75,139.1,2026-04-08,2026-05-05 +FK-1070,2025-12-31,houzz,Priya,2026-01-06,2026-01-18,22,premium,oak,3.9,17650.0,lost,went with a quicker quote,,,,,,,,,, +FK-1071,2026-01-08,website,Priya,2026-01-18,2026-01-29,9,premium,oak,6.9,9850.0,lost,went with a quicker quote,,,,,,,,,, +FK-1072,2026-01-14,repeat,Priya,2026-01-26,2026-02-04,10,standard,quartz,8.3,12320.0,won,,2026-02-17,2026-03-27,2026-03-27,2026-04-04,2,survey measurement,7257.53,126.6,2026-04-15,2026-04-24 +FK-1073,2026-01-21,referral,Owen,2026-01-31,2026-02-11,25,premium,quartz,8.7,24840.0,lost,price,,,,,,,,,, +FK-1074,2026-01-27,showroom,Priya,2026-02-06,2026-02-16,16,premium,quartz,3.4,14470.0,lost,project postponed,,,,,,,,,, +FK-1075,2026-02-02,referral,Owen,2026-02-11,2026-02-20,8,premium,quartz,3.1,8660.0,lost,no reply,,,,,,,,,, +FK-1076,2026-02-07,houzz,Priya,2026-02-18,2026-02-23,18,standard,quartz,6.3,14940.0,won,,2026-03-08,2026-04-29,2026-05-01,2026-05-07,0,,7554.25,156.7,2026-05-09,2026-06-14 +FK-1077,2026-02-11,showroom,Priya,2026-02-23,2026-03-02,11,premium,laminate,6.2,9750.0,won,,2026-03-14,2026-04-25,2026-04-25,2026-04-28,0,,4717.39,121.3,2026-05-16,2026-05-23 +FK-1078,2026-02-13,showroom,Owen,2026-02-25,2026-02-27,15,premium,laminate,3.8,12000.0,won,,2026-03-08,2026-04-26,2026-04-26,2026-05-01,0,,5839.53,146.8,2026-05-21,2026-06-19 +FK-1079,2026-02-16,houzz,Owen,2026-02-21,2026-03-06,26,standard,oak,3.8,15830.0,lost,project postponed,,,,,,,,,, +FK-1080,2026-02-21,showroom,Priya,2026-02-27,2026-03-06,25,standard,laminate,7.1,15320.0,lost,price,,,,,,,,,, +FK-1081,2026-03-01,repeat,Owen,2026-03-07,2026-04-15,19,premium,laminate,8.0,15730.0,lost,chose a national chain,,,,,,,,,, +FK-1082,2026-03-06,referral,Owen,2026-03-09,2026-03-13,8,premium,laminate,4.4,7250.0,won,,2026-03-20,2026-04-17,2026-04-19,2026-04-22,0,,3372.37,89.1,2026-04-30,2026-05-11 +FK-1083,2026-03-09,website,Owen,2026-03-12,2026-03-29,20,standard,oak,5.0,13210.0,lost,price,,,,,,,,,, +FK-1084,2026-03-11,showroom,Owen,2026-03-19,2026-03-26,22,premium,quartz,6.6,21120.0,lost,chose a national chain,,,,,,,,,, +FK-1085,2026-03-19,website,Owen,2026-03-25,2026-04-06,21,standard,oak,4.1,13350.0,lost,chose a national chain,,,,,,,,,, +FK-1086,2026-03-21,showroom,Owen,2026-04-02,2026-04-06,12,premium,laminate,5.6,10310.0,won,,2026-04-26,2026-06-12,2026-06-12,2026-06-17,0,,5034.15,117.6,2026-06-27,2026-07-23 +FK-1087,2026-03-29,repeat,Priya,2026-04-01,2026-04-09,14,standard,laminate,5.8,9290.0,lost,price,,,,,,,,,, +FK-1088,2026-04-06,showroom,Priya,2026-04-09,2026-04-27,18,premium,laminate,6.5,14690.0,lost,no reply,,,,,,,,,, +FK-1089,2026-04-13,website,Owen,2026-04-23,2026-05-07,24,premium,oak,5.0,19510.0,won,,2026-05-15,2026-06-12,2026-06-24,2026-07-01,0,,10205.63,222.2,2026-07-04,2026-08-02 +FK-1090,2026-04-15,houzz,Owen,2026-04-20,2026-05-11,25,standard,laminate,8.1,15540.0,lost,price,,,,,,,,,, +FK-1091,2026-04-23,showroom,Owen,2026-05-03,2026-05-19,10,standard,quartz,4.5,9380.0,lost,chose a national chain,,,,,,,,,, +FK-1092,2026-04-29,website,Priya,2026-05-08,2026-05-17,17,standard,laminate,4.7,10610.0,won,,2026-05-23,2026-07-18,2026-07-20,2026-07-24,0,,4429.87,140.3,2026-08-14,2026-08-30 +FK-1093,2026-05-06,showroom,Priya,2026-05-16,2026-05-25,14,standard,oak,6.6,10750.0,lost,price,,,,,,,,,, +FK-1094,2026-05-13,repeat,Priya,2026-05-22,2026-05-30,8,premium,quartz,7.0,11680.0,won,,2026-06-08,2026-07-27,2026-08-04,2026-08-07,0,,6385.85,95.5,2026-08-11,2026-09-08 +FK-1095,2026-05-20,showroom,Priya,2026-05-28,2026-06-01,10,standard,quartz,5.2,9920.0,won,,2026-06-20,2026-07-23,2026-07-23,2026-07-27,0,,5002.8,106.0,2026-08-08,2026-09-12 +FK-1096,2026-05-22,showroom,Priya,2026-05-31,2026-06-06,14,standard,laminate,8.0,9790.0,won,,2026-06-16,2026-08-11,2026-08-13,2026-08-18,0,,4098.46,137.4,2026-09-03,2026-09-13 +FK-1097,2026-05-29,website,Owen,2026-06-04,2026-06-10,24,standard,laminate,5.8,14500.0,won,,2026-06-24,2026-08-10,2026-08-10,2026-08-18,0,,6283.65,204.9,2026-08-24,2026-09-23 +FK-1098,2026-06-06,referral,Priya,2026-06-15,2026-06-26,14,standard,laminate,5.5,9220.0,lost,went with a quicker quote,,,,,,,,,, +FK-1099,2026-06-12,repeat,Owen,2026-06-17,2026-06-21,17,standard,laminate,9.2,11620.0,won,,2026-06-30,2026-08-09,2026-08-09,2026-08-14,0,,4902.91,152.0,2026-09-03,2026-10-03 +FK-1100,2026-06-20,houzz,Priya,2026-06-26,2026-07-03,21,standard,laminate,8.4,13530.0,won,,2026-07-17,2026-08-26,2026-09-07,2026-09-14,0,,5715.06,173.1,2026-09-18,2026-10-12 +FK-1101,2026-06-26,referral,Priya,2026-07-03,2026-07-15,17,standard,laminate,5.9,10880.0,lost,price,,,,,,,,,, +FK-1102,2026-07-02,showroom,Priya,2026-07-09,2026-07-21,16,standard,laminate,6.4,10470.0,lost,went with a quicker quote,,,,,,,,,, +FK-1103,2026-07-09,houzz,Priya,2026-07-17,2026-07-29,16,standard,laminate,6.5,10490.0,won,,2026-08-17,2026-09-24,2026-09-26,2026-10-01,0,,4449.03,136.0,2026-10-14,2026-11-05 +FK-1104,2026-07-11,houzz,Owen,2026-07-19,2026-08-01,16,standard,oak,7.3,12090.0,lost,chose a national chain,,,,,,,,,, +FK-1105,2026-07-17,showroom,Owen,2026-07-22,2026-08-28,19,premium,laminate,5.6,15190.0,lost,project postponed,,,,,,,,,, +FK-1106,2026-07-21,showroom,Owen,2026-07-29,2026-08-04,8,premium,quartz,2.7,8350.0,won,,2026-08-19,2026-10-09,2026-10-18,2026-10-22,0,,4214.75,86.3,2026-11-02,2026-11-14 +FK-1107,2026-07-28,showroom,Priya,2026-07-31,2026-08-17,15,premium,laminate,2.6,11730.0,lost,chose a national chain,,,,,,,,,, +FK-1108,2026-08-01,referral,Owen,2026-08-06,2026-08-14,15,standard,laminate,4.6,9540.0,lost,went with a quicker quote,,,,,,,,,, +FK-1109,2026-08-08,showroom,Priya,2026-08-18,2026-08-27,21,standard,oak,4.4,13480.0,won,,2026-09-11,2026-10-17,2026-10-17,2026-10-22,0,,5930.98,186.5,2026-10-27, +FK-1110,2026-08-14,houzz,Owen,2026-08-23,2026-09-07,17,standard,quartz,9.2,16670.0,lost,price,,,,,,,,,, +FK-1111,2026-08-17,website,Priya,2026-08-27,2026-09-03,15,standard,quartz,6.8,13770.0,lost,price,,,,,,,,,, +FK-1112,2026-08-19,repeat,Priya,2026-08-22,2026-08-30,13,premium,oak,4.9,11800.0,won,,2026-09-09,2026-10-30,2026-10-30,,,,,,, +FK-1113,2026-08-25,houzz,Priya,2026-08-31,2026-09-12,9,standard,quartz,2.8,7550.0,won,,2026-09-16,2026-10-29,2026-11-10,,,,,,, +FK-1114,2026-09-01,showroom,Owen,2026-09-04,2026-09-15,22,standard,quartz,6.6,17260.0,lost,price,,,,,,,,,, +FK-1115,2026-09-05,houzz,Priya,2026-09-12,2026-09-22,8,premium,quartz,5.9,10830.0,pending,,,,,,,,,,, +FK-1116,2026-09-07,repeat,Priya,2026-09-11,2026-09-25,11,standard,laminate,6.7,7930.0,pending,,,,,,,,,,, +FK-1117,2026-09-11,website,Owen,2026-09-18,2026-09-27,22,standard,quartz,9.0,19120.0,pending,,,,,,,,,,, +FK-1118,2026-09-16,repeat,Owen,2026-09-25,2026-10-12,24,standard,oak,8.9,16930.0,pending,,,,,,,,,,, +FK-1119,2026-09-24,houzz,Owen,2026-10-01,2026-10-13,21,premium,laminate,5.5,16560.0,pending,,,,,,,,,,, +FK-1120,2026-09-27,houzz,Owen,2026-10-03,2026-10-10,9,standard,laminate,2.9,6030.0,pending,,,,,,,,,,, +FK-1121,2026-10-04,referral,Owen,2026-10-13,2026-10-22,25,premium,laminate,4.4,19100.0,pending,,,,,,,,,,, diff --git a/demos/fernhill/material/jobs.md b/demos/fernhill/material/jobs.md new file mode 100644 index 0000000..e289bc0 --- /dev/null +++ b/demos/fernhill/material/jobs.md @@ -0,0 +1,22 @@ +# The job sheet export (`jobs.csv`) + +*(Made up for Morphogen's demo engagement.)* Exported by Dee from `jobs.xlsx` on 2026-11-20: every enquiry that +reached a survey from January 2025. Dates are ISO dates; money is pounds, before VAT. + +| Column | What it is | +| --- | --- | +| job_id | our job number | +| enquiry_date, source | when and how the enquiry came in | +| designer | who surveyed, designed and quoted | +| survey_date, quote_sent_date | the survey visit; the day the quote PDF was emailed | +| cabinets, range, worktop_material, worktop_m | what was quoted (the calculator's four inputs) | +| quoted_price | the price quoted | +| outcome, lost_reason | won, lost or pending; for lost jobs, what the customer said, when they said | +| deposit_date | the deposit paid | +| fit_planned_start, fit_start, fit_end | the fitting week first written on the whiteboard; when fitting actually began and was signed off | +| remade_cabinets, remake_cause | cabinets made or ordered again, and why | +| actual_materials | supplier bills coded to the job in Xero (the bookkeeper has done this since January 2025) | +| actual_labour_hours | workshop and fitting hours from the weekly timesheets | +| final_invoice_date, paid_date | the 60% balance invoiced, and paid | + +Blank means not yet, or not applicable. diff --git a/demos/fernhill/material/overview.md b/demos/fernhill/material/overview.md new file mode 100644 index 0000000..190aabe --- /dev/null +++ b/demos/fernhill/material/overview.md @@ -0,0 +1,32 @@ +# Fernhill Kitchens: who we are + +*(Made up for Morphogen's demo engagement. No such firm exists.)* + +Fernhill Kitchens designs, builds and fits kitchens in and around a market town in the English Midlands. We were +founded in 2009 by Sian Hollis, a joiner, and we have grown to 11 people. We make our own cabinet doors and +frames in our workshop and buy in carcasses (the cabinet boxes) and worktops. + +## What we sell + +- Kitchens from about £7,000 to £25,000 fitted, in two ranges: **Standard** (painted MDF doors, bought-in + carcasses) and **Premium** (solid timber doors, heavier carcasses). +- Worktops in laminate, oak or quartz. Quartz is templated and cut by our supplier, Stonecraft, after our + cabinets are in. +- Design, supply and fit. We do not supply appliances; customers buy their own and we fit them. + +## Who we are + +| Team | People | What they do | +| --- | --- | --- | +| Directors | 2 | Sian Hollis (managing director), Mark Hollis (workshop and fitting) | +| Office | 1 | Dee Grant (office manager: diary, orders, invoices); a bookkeeper two days a month, not on staff | +| Design and sales | 2 | Owen and Priya: survey, design, quote, follow-up | +| Workshop | 2 | doors, frames, assembly, finishing | +| Fitting | 4 | two fitting pairs | +| Surveyor | 0 | surveys are done by the designers | + +## Numbers (year to March 2026) + +- Turnover about £400,000; about 30 kitchens fitted. +- About 70 enquiries a year reach a survey. +- Showroom open Tuesday to Saturday. diff --git a/demos/fernhill/material/process.md b/demos/fernhill/material/process.md new file mode 100644 index 0000000..7b0fa66 --- /dev/null +++ b/demos/fernhill/material/process.md @@ -0,0 +1,24 @@ +# How a job runs (the office's handbook, revised March 2024) + +*(Made up for Morphogen's demo engagement.)* + +1. **Enquiry.** Comes in by the website form, phone, the showroom or Houzz. Dee logs it in the job sheet + (`jobs.xlsx`, one row a job) and books a survey in the shared Google calendar. +2. **Survey.** Owen or Priya visits, measures with a tape and a laser, sketches the room on paper, takes photos + on their phone and talks budget. +3. **Design.** Back in the office the designer draws the kitchen in SketchUp. Two or three rounds with the + customer by email are normal. +4. **Quote.** The designer counts cabinets and worktop metres off the drawing and types them into the quote + calculator (`Quote calculator v7.xlsx`, see quote-calculator.md). The calculator gives the price. The quote is + written up in Word from a template and emailed as a PDF. *Aim: quote within 5 working days of the survey.* +5. **Follow-up.** The designer chases after a week. If the customer goes quiet for a month the job is marked + lost. +6. **Deposit.** 40% on acceptance, invoiced by Dee in Xero. The job gets a fitting week, written on the + whiteboard in the workshop. +7. **Orders.** Dee orders carcasses (from Lindale Carcass Co.), hardware and laminate or oak worktops by email; + quartz is booked with Stonecraft once the cabinets are fitted. Order details are retyped from the quote. +8. **Workshop.** Mark plans the workshop's week on the whiteboard: doors and frames for the next fittings. +9. **Fit.** A fitting pair fits the kitchen. Their week is on the whiteboard and in a WhatsApp group. Quartz + templating is a separate visit, fitting a separate visit about ten days later. +10. **Snagging and sign-off.** The lead fitter walks the customer round and notes snags. +11. **Final invoice.** 60% balance, raised by Dee in Xero when the lead fitter tells her the job is signed off. diff --git a/demos/fernhill/material/quote-calculator.md b/demos/fernhill/material/quote-calculator.md new file mode 100644 index 0000000..1a887e0 --- /dev/null +++ b/demos/fernhill/material/quote-calculator.md @@ -0,0 +1,28 @@ +# The quote calculator (`Quote calculator v7.xlsx`) + +*(Made up for Morphogen's demo engagement. Described by Owen, who maintains it.)* + +The designer types four things: the number of cabinets, the range (Standard or Premium), the worktop material +and the worktop length in metres. The sheet works out a cost and adds the margin. + +| Cell | Name | Value | What it is | +| --- | --- | --- | --- | +| B3 | Carcass, Standard | £210 | one carcass with its fittings, Lindale's price | +| B4 | Carcass, Premium | £340 | | +| B6 | Worktop, laminate | £95 / m | supplier's price per metre | +| B7 | Worktop, oak | £210 / m | | +| B8 | Worktop, quartz | £420 / m | Stonecraft's price per metre, templated and cut | +| B10 | Worktop waste | 25% | added to every worktop for offcuts and joints | +| B12 | Hours per cabinet | 5.5 | workshop and fitting labour per cabinet | +| B13 | Hours per worktop metre | 1.5 | fitting labour per metre of worktop | +| B14 | Fixed hours per job | 16 | survey, design, delivery, snagging | +| B16 | Labour rate | £32 / hour | what an hour costs us | +| B18 | Margin | 35% | added on top of the cost | + +**Cost** = cabinets × carcass + worktop metres × worktop price × (1 + waste) +\+ (cabinets × hours per cabinet + worktop metres × hours per worktop metre + fixed hours) × labour rate. + +**Price** = cost × (1 + margin), rounded to the nearest £10. + +The constants were last changed in March 2023. Nobody compares a job's quote with what it cost afterwards; the +bookkeeper's numbers are for the whole year. diff --git a/demos/fernhill/material/tools.md b/demos/fernhill/material/tools.md new file mode 100644 index 0000000..5efd10c --- /dev/null +++ b/demos/fernhill/material/tools.md @@ -0,0 +1,18 @@ +# Our systems (written by Dee for the engagement, November 2026) + +*(Made up for Morphogen's demo engagement.)* + +| What | Tool | Who uses it | Notes | +| --- | --- | --- | --- | +| Email, calendar, files | Google Workspace (Business Starter, 5 accounts) | office, designers, directors | survey bookings in a shared calendar | +| Job sheet | `jobs.xlsx` in Google Drive | Dee, designers | one row a job; the attached export is `jobs.csv` | +| Quote calculator | `Quote calculator v7.xlsx` | designers | constants last changed in 2023 | +| Design | SketchUp Pro (2 seats) | designers | drawings by hand; no cutting lists | +| Quote documents | Word template | designers | PDF by email | +| Accounts | Xero (Standard) | Dee, bookkeeper | deposits and final invoices; supplier bills | +| Workshop and fitting plan | a whiteboard in the workshop, and photos of it | Mark, fitters, Dee | | +| Fitters' messages | WhatsApp groups, one per fitting pair | Mark, fitters | photos of snags, "where is the hob" | +| Supplier orders | email | Dee | retyped from the quote | +| Phones | fitters use their own Android phones; office and designers have iPhones | | | + +We would rather not run a server. Budget for software is "a few hundred pounds a month if it pays for itself". diff --git a/demos/fernhill/prompt.md b/demos/fernhill/prompt.md new file mode 100644 index 0000000..6e57da1 --- /dev/null +++ b/demos/fernhill/prompt.md @@ -0,0 +1,25 @@ +# The engagement + +You are running a Morphogen engagement for a small firm. Its material is in `material/` (documents, a job sheet +export and an interview transcript). `material/` is the client's and stays out of git (it is in `.gitignore`): +read it, cite it, never commit it. Work only with files and Morphogen's skills and tools; there is no database. + +Produce, in this project: + +1. **The map** (the `map` skill): the firm as Backstage entity files, `catalog-info.yaml` and a `catalog/` folder, + every claim carrying `morphogen.dev/evidence` with a quote copied from its source and the right line. +2. **Baselines**: a script in `analysis/` that computes, from the job sheet, the measures each opportunity is + about, and its output kept in `analysis/`. +3. **One opportunity drafted as a cell** that the judge can judge (`change`, `run`, `better`, `score`, `tests`), + with held-out answers outside the repository (`morphogen.local.yaml`, under the directory given as DATA below); + then measure it, improve it (`tune` or a change on a branch) and get the judge's verdict. +4. **Options for one role** (the `catalog` skill): at least three, as `lifecycle: candidate` Components, each fact + from the vendor's or registry's own page, quoted. +5. **`report.md`** for the firm's director: the findings with their numbers and sources, and each opportunity + written up as an implementation project: what changes, the target and its measure, the options, what it is + worth, the cost and the risk. Say what was measured and what was not. + +There is no person to ask: the interview transcript is the interview, and you act for the operator in approving +your own branches (merge them into `main` with a message that says so). Rules go on `main` before a candidate is +judged against them. Use `morphogen status` after each step. Finish when `status` shows a verdict for your cell +and `report.md` is committed. diff --git a/demos/fernhill/run.sh b/demos/fernhill/run.sh new file mode 100755 index 0000000..0e5cd90 --- /dev/null +++ b/demos/fernhill/run.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# The engagement, unattended: a fresh project from material/, Claude Code with Morphogen's plugin and nothing +# else, then check.py on what it left. Nothing from engagement/ (the first run's results) or making/ (the +# generator, which knows the answers) is copied in. +# +# demos/fernhill/run.sh WORKDIR [PLUGIN_DIR] +# +# PLUGIN_DIR: Morphogen's installed plugin (default: the newest copy under ~/.claude/plugins/cache/morphogen). +# Needs: git, python3, uv, Podman, Claude Code signed in. Spends a Claude Code session's usage (sonnet). +set -eu +here=$(cd "$(dirname "$0")" && pwd) +work=${1:?usage: run.sh WORKDIR [PLUGIN_DIR]} +plugin=${2:-$(ls -d "$HOME"/.claude/plugins/cache/morphogen/morphogen/*/ | tail -1)} +mkdir -p "$work" +work=$(cd "$work" && pwd) +proj=$work/project +data=$work/data +[ -e "$proj" ] && { echo "$proj exists; use an empty WORKDIR" >&2; exit 1; } +mkdir -p "$proj" "$data" +cp -r "$here/material" "$proj/material" +cd "$proj" +git init -q -b main +git config user.name "Engagement" +git config user.email "engagement@example.invalid" +printf 'material/\nmorphogen.local.yaml\n__pycache__/\n' > .gitignore +git add .gitignore +git commit -qm "Engagement: start" +{ cat "$here/prompt.md"; printf '\nDATA (for held-out answers, outside the repository): %s\n' "$data"; } > "$work/prompt.txt" +claude -p --model sonnet --plugin-dir "$plugin" --permission-mode auto --add-dir "$data" \ + < "$work/prompt.txt" > "$work/session.txt" 2>&1 || echo "claude exited $?" >&2 +python3 "$here/check.py" "$proj" "$plugin" From 424dd8d6f8cfcfb8485847612d6a45e534e4367f Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 17:10:41 -0800 Subject: [PATCH 2/2] Demo fernhill: the unattended run passes its checks; its report kept Co-Authored-By: Claude Opus 5.5 --- demos/fernhill/README.md | 15 ++- .../fernhill/runs/2026-11-24-sonnet/check.txt | 8 ++ .../fernhill/runs/2026-11-24-sonnet/report.md | 124 ++++++++++++++++++ 3 files changed, 145 insertions(+), 2 deletions(-) create mode 100644 demos/fernhill/runs/2026-11-24-sonnet/check.txt create mode 100644 demos/fernhill/runs/2026-11-24-sonnet/report.md diff --git a/demos/fernhill/README.md b/demos/fernhill/README.md index 7eb3e94..90d3155 100644 --- a/demos/fernhill/README.md +++ b/demos/fernhill/README.md @@ -11,6 +11,7 @@ options catalogued for one role, cells drafted for one opportunity) and a demo o | [making/](making/) | how `jobs.csv` was made (`make_jobs.py`, one seed). It holds the true costs the engagement has to find, so no engagement run sees it. | | [engagement/](engagement/) | the first run's result, done in a Claude Code session following the skills: the map (`catalog-info.yaml`, `catalog/`), the baselines (`analysis/`), the quote calculator as a judged cell (`cells/quote/`), four options for job scheduling (`catalog/scheduling.yaml`) and [the report](engagement/report.md). | | `prompt.md`, `run.sh`, `check.py` | the engagement unattended: a fresh project from `material/`, Claude Code with only the plugin, then the checks of its result | +| [runs/](runs/) | unattended runs: each one's report and `check.py` output | ## The first run (2026-11-24) @@ -24,7 +25,15 @@ options catalogued for one role, cells drafted for one opportunity) and a demo o - **Report:** four projects: the calculator (about £53,000 a year of margin), quotes in three days, a schedule the fitters can see, fewer remakes. -What the run found in the kit, for issues: +## The unattended run (2026-11-24, sonnet) + +`run.sh`, no help: all eight checks pass ([check.txt](runs/2026-11-24-sonnet/check.txt)); 29 evidence quotes, all +found. It mapped the firm, drafted its own quote cell (hours per cabinet split by range), tuned it to held-out +error 15.0% to 4.5% (pass) by moving fixed hours per job from 16 to 50, catalogued Tradify, ServiceM8, Powered Now +and Jobber, and wrote [a report](runs/2026-11-24-sonnet/report.md) of five projects. It said itself that 50 is the +top of the range it allowed, standing in for under-counted hours per cabinet. + +## What the runs found in the kit, for issues 1. **A plugin update did not happen.** #102 and #103 changed the plugin but not its version (0.8.0), so `claude plugin update` reported "already at the latest version" and kept code from before them; the old code @@ -34,7 +43,9 @@ What the run found in the kit, for issues: best p is 0.0156), so a 9-point gain failed. `status` and `structure_check` could say so before a run. 3. **Org maps are noisy in `status`.** Every process step is listed as a cell, `ready: false`, though none has a `run`; structure-only entities could be listed apart. -4. **The CLI needs a file.** `morphogen structure check` takes the catalog's path, where `status` finds it itself. +4. **A tuned value at its bound passes without a word.** The unattended run's pass rests on a setting at the + top of its range; `tune` could report it, since a value at the bound means the range, not the system, chose it. +5. **The CLI needs a file.** `morphogen structure check` takes the catalog's path, where `status` finds it itself. Run it again (Python 3.11 or later, Podman, Claude Code signed in): diff --git a/demos/fernhill/runs/2026-11-24-sonnet/check.txt b/demos/fernhill/runs/2026-11-24-sonnet/check.txt new file mode 100644 index 0000000..ae05080 --- /dev/null +++ b/demos/fernhill/runs/2026-11-24-sonnet/check.txt @@ -0,0 +1,8 @@ +PASS report.md committed on main +PASS the client's material is not committed +PASS a catalog: 3 files +PASS structure check: no errors +PASS a cell with a verdict: quote-calculator +PASS at least three options for a role: 5 candidates +PASS evidence quotes are where they say: 29 of 29 +PASS the report writes opportunities up as projects diff --git a/demos/fernhill/runs/2026-11-24-sonnet/report.md b/demos/fernhill/runs/2026-11-24-sonnet/report.md new file mode 100644 index 0000000..70cf64b --- /dev/null +++ b/demos/fernhill/runs/2026-11-24-sonnet/report.md @@ -0,0 +1,124 @@ +# Fernhill Kitchens: where the money goes, and what to do about it + +For Sian Hollis, managing director. Prepared 24 November 2026 from the job sheet export (121 jobs that reached a survey, January 2025 to October 2026), the handbook, the tools list, the calculator description and your interview. All numbers are before VAT. Scripts and outputs are in `analysis/` (`baselines.py`, `baselines.txt`, `value_estimates.txt`); the firm is mapped in `catalog-info.yaml` and `catalog/`, each claim with a quote from your documents. + +## 1. The short answer + +**The leak is the quote calculator.** On the 50 won jobs that have actual costs, you charged 14.4% over what the job cost, not 35%. The sheet underestimates labour: jobs took 1.36 times the hours the calculator allows. Nothing is wrong with the margin setting. The calculator's cost is simply too low, so 35% on top of it is about 14% on top of reality. Against 35% on actual cost, the 50 jobs are about £113,000 short, roughly £2,260 a job. + +**Slow quotes cost you jobs too.** The median quote leaves 6 working days after the survey, not 5. Jobs quoted within 5 working days were won 71% of the time and jobs quoted later 29%. That is an association: I could not prove slowness causes losing. + +**Remakes are less common than Mark thinks**, 12% of fitted jobs and not one in five, and they are a small money item. + +## 2. Findings + +All from `analysis/baselines.txt` unless noted. "Actual cost" is `actual_materials` plus `actual_labour_hours` at £32 an hour, the calculator's own rate. It leaves out any overhead, and survey and design time if the timesheets do not hold it, so true margin is, if anything, lower. + +| Finding | Number | Source | +| --- | --- | --- | +| Jobs, won / lost / pending | 121: 52 / 62 / 7; win rate 45.6% of decided | jobs.csv | +| The calculator reproduces every quoted price | 121 of 121 exact | my reimplementation, `calculator/` | +| Realised margin on cost, won jobs with actuals (n=50) | **14.4%** against 35% intended | quoted price against actual cost | +| Calculator cost against actual cost | 15.3% too low in total; mean absolute error 14.5% per job | | +| Actual hours against calculator hours | 1.36 times; Premium jobs 1.51 times, Standard 1.29 times | | +| Actual materials against calculator materials | 1.06 times: a 6% rise, in line with Lindale's increase | | +| Realised margin by range | Premium 10.1%, Standard 16.8% | | +| Realised margin by worktop | oak 10.1%, quartz 14.1%, laminate 16.6% | | +| Realised margin, quoted in 2025 / 2026 | 13.5% / 16.1% | | +| Jobs under 20% realised margin | 40 of 50 | | +| Quote lag, survey to quote sent (working days) | median 6, mean 7.1; 38.8% within 5 days, 11.6% within 3 | Owen median 7, Priya 6 | +| Win rate by quote lag | up to 3 days 71% (n=14); 4-5 days 71% (31); 6-8 days 39% (41); 9+ days 14% (28) | | +| Lost jobs by reason (62) | price 22, quicker quote 15, national chain 11, no reply 9, postponed 5 | | +| Quoted value of jobs lost to a quicker quote | £190,010 across 15 jobs (over 1.7 years) | | +| Remakes | 6 of 50 fitted jobs (12%); 12 cabinets; 5 survey measurement, 1 damaged in delivery | | +| Fitting started later than the whiteboard plan | 23 of 50 (46%); median 4 working days late; oak 78% late, quartz 47%, laminate 35% | | +| Fit end to final invoice | median 12.5 days, longest 23 | | +| Invoice to paid | median 24 days | | + +Things the data does **not** show: +- The "one in five" remake rate (it is 12%). +- The double-bookings: two pairs at one house is in your interview only. The sheet has no record of it. +- That Owen's habits are the problem. Margins by designer are 14.8% (Owen) and 14.0% (Priya). + +## 3. Opportunities as projects + +### A. Reprice the calculator (done as a draft, judged) + +**What changes.** Constants in `Quote calculator v7.xlsx` are replaced with values fitted to what jobs actually cost. Margin stays 35% on cost, the supplier prices and the £32 rate stay. + +**Target and measure.** Mean absolute error between calculator cost and actual cost, on jobs the fitting never saw. Today 15.0%. + +**What was measured.** The calculator is built as a cell (`quote-calculator`). 50 won jobs were split: 30 for practice and 20 held back outside the repository for the verdict. The judge's verdict is **pass**: error on the 20 held-out jobs fell from 15.0% to 4.5% (7 runs, sign test p = 0.008), the tests pass (price is cost x 1.35 to the nearest £10; supplier prices, £32 rate and margin fixed), and average price rises 12.2%. The change that passed was one setting: fixed hours per job 16 to 50. + +**Caveats, read these.** +- 50 hours of fixed overhead is not literal. The value is the top of the range I allowed, so the search wanted more. It is covering for hours per cabinet being too low, especially on Premium (1.51 times against 1.29 times). A second round should allow range-specific hours and a wider range, and fit them to more jobs. +- Only 20 jobs sit behind the verdict. +- Raising prices will lose some jobs: 22 of 62 losses are already "price". I have not measured how win rate responds to price, and this report does not claim it. +- The reviewer found one blemish: the tuning rewrote `calculator/settings.py` and removed five explanatory comments. No scoring problem was found. +- The change is on `main` in the Python copy of the calculator. **The spreadsheet itself has not been changed.** Owen has to type the new constants in. + +**Options.** (1) Fixed-hours-only fix as judged: £0, an hour of Owen's time. (2) The two-range refit above: one more session. (3) Raise the margin number: not recommended, since the bank's 35% is right and the cost under it is wrong. + +**Worth.** On the 20 held-out jobs the new prices would have given about 28.5% realised margin, up from 14.6% (calculation: 1.1456 x 1.1218 - 1; not a judged number). If prices rose that way and volume held, 14 more points of margin on an average actual cost of about £10,900 is roughly £1,500 a job, or about £45,000 a year at 30 jobs. That is the ceiling. If higher prices cut wins by a third, the gain is still positive but much smaller; I cannot say how much. + +**Cost.** Almost nothing in money. **Risk.** Lost jobs on price (above); a 50-hour constant that hides a pattern; staff judgement overriding the sheet. + +### B. Quote within 3 working days + +**What changes.** The quote is not typed up from scratch: the designer enters the four calculator inputs from the drawing and sends a templated quote the same day, with a fixed day for each survey's quote slot. Tools that quote and schedule in one place are in section 4. + +**Target and measure.** Median survey-to-quote 6 working days to 3; share within 5 days 39% to 90%. Both come straight from the job sheet columns, and `baselines.py` reproduces them. + +**Worth.** If the 69 decided jobs quoted after day 5 had won at the fast rate (71%) instead of 29%, that would be about 17 more wins a year. That is an upper bound: fast jobs are slightly different (40% quartz against 28%), and win rate may be tied to the customer. At half the effect, about 8 more wins a year at about £1,570 gross margin each at today's prices is **about £13,000 a year**, and more once Project A raises the margin. It is measured as an association only. + +**Cost.** Mostly time. A quoting tool is £25 to £44 a user a month (section 4). **Risk.** Designers cannot quote faster because the drawing is the slow step (not measured: the sheet has no design date). Faster quotes with a stale calculator win jobs at 14% margin, so do A first. + +### C. Fitting plan on a shared diary (options in section 4) + +**What changes.** The whiteboard and WhatsApp plan becomes one shared calendar with a job per fitting pair, a quartz template visit booked automatically, and the "signed off" tap that tells Dee to invoice. + +**Target and measure.** Share of jobs starting later than planned, 46% today (oak 78%); days from fit end to final invoice, median 12.5. Double-bookings counted from now on, since none were recorded. + +**Worth.** Not measured in money. A fortnight's slip on cash is one fortnight's interest on about £8,000 outstanding at the export: small. The value is mostly avoided embarrassment and fitter time, which I could not price from the sheet. + +**Cost.** Roughly £25 to £200 a month depending on the tool and the number of users (inferred from vendor list prices, section 4). **Risk.** The fitters must like it and it must run on their own Android phones; that was the condition you set. No tool has been trialled. + +### D. Fewer remakes + +**What changes.** Photo and dimension check on the survey, a second pair of eyes before the carcass order. + +**Target.** Remake jobs per year, 3.5 today (6 jobs in 1.7 years). + +**Worth.** About 7 cabinets a year plus about 24 extra hours a remake job: on the order of £4,000 a year (inferred from the average carcass price and £32 an hour). 5 of 6 remakes were measurement. **Cost** small. **Risk** low, but it is the smallest of the four. + +### E. Invoice when signed off + +Median 12.5 days from fit end to invoice, longest 23. Moving to same day gives about 12 days earlier cash on each of 30 jobs: a convenience, not a leak. Part of C. + +## 4. Options for one role: the fitting planner + +Role `job-and-fitting-planner` (`catalog/options.yaml`), requiring the interface `fitting-schedule`: jobs assigned to staff on a shared calendar, in a mobile app on Android and iPhone. Four candidates, each fact a quote from the vendor's own page (read 24 November 2026). None was trialled, so fit is by stated features only. + +| Option | Price (vendor page) | Android | Xero | Notes | +| --- | --- | --- | --- | --- | +| Tradify (tradifyhq.com/uk/pricing) | £34 / £37 / £44 per user a month (Lite / Pro / Plus) | "iPhone, iPad, or Android mobile device" | "2-way sync with Xero and Sage" | month to month; per user, so 6 users on Lite is about £204 a month (my arithmetic) | +| ServiceM8 (servicem8.com/uk/pricing) | £25 / £59 / £119 a month per plan, unlimited users on paid plans | "iOS & Android apps" | accounting sync (Xero named on the homepage badge, not quoted) | the plan caps jobs a month (50 on the £25 plan), which this firm sits far under; another page of the vendor and a search listing disagreed about Android, so test on a fitter's phone first | +| Powered Now (powerednow.com/pricing) | £28 one user; £32 or £40 a user a month; excluding VAT | "iPhone, iPad and Android phone & tablet" | only Professional and above | rolling, no contract | +| Jobber (getjobber.com/pricing) | USD only; extra users $29 a month | "iOS and Android mobile apps" | "Xero" named, plan unclear | no UK price list found; least certain | + +My pick for a trial, ahead of a decision: **ServiceM8 on the £25 plan**, on price, if Android holds up on a fitter's own phone; otherwise Tradify Lite. This is a recommendation to trial, not a verdict: nothing here is a judge result. The cost is within "a few hundred pounds a month". + +## 5. What was measured and what was not + +Measured (script output, reproducible): everything in the table in section 2; the cost-error result of the tuned calculator (judge verdict, held-out 20 jobs); the baseline of the calculator on the same jobs. + +Not measured: how customers respond to higher prices; whether faster quotes cause more wins; the design time before a quote; double-bookings; the time cost of remakes beyond the timesheet hours; the vendors' tools in use; survey and design hours in the cost base. The vendor facts come from a read of their pages by a web-fetch step; I did not open the pages myself. + +Method notes: the job sheet gives 50 won jobs with actuals; the 30/20 split is mine (by order in the sheet). Interview claims are quoted as Sian's. The map was merged to `main` on my own approval as the operator's stand-in (no person was available), as was the tuned calculator. + +## 6. Order of work + +1. Project A, second round (range-specific hours, wider range, more jobs), then Owen updates the sheet. Fastest, cheapest, largest. +2. Project B alongside it: the 3-day quote. +3. Trial a planner (C, E) for four weeks on one fitting pair's Android phones. +4. D after that if the measurement checklist shows remakes persist.