First generated site, a held-out test, and the leak it exposed
runs/contractor-2026-09-21: the generator's first end-to-end run, on intakes/contractor.yaml. Needs parsed first round, structure green first round, 10/10 on its own personas - and 8/10 headings-only on ten held-out personas with qwen3:8b as the visitor, because the pages had been written with the personas in view. Phase 2 now shows the model the needs without the personas. `portal-trainer answer` exposes the blind answerer on its own. README rewritten around what this is: an intake in, a verified content repo out. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L4jrCgLiKKHAEFuZUJjckH
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
b6bdac6f62
commit
e163c22792
@@ -1,123 +1,136 @@
|
||||
# portal-trainer
|
||||
|
||||
Onboarding a business onto [portal](https://project.uhhm.no/uhhm/portal)
|
||||
is mostly a wording problem: the engine is generic, and whether it
|
||||
works for a given business depends on whether its pages say, in the
|
||||
visitor's words, the thing the business needs them to answer. This
|
||||
repo is where that gets tested and, eventually, learned.
|
||||
A business describes itself in plain words: what it does, who comes to
|
||||
it, what it keeps track of and through which stages, and who handles
|
||||
what. `portal-trainer` turns that into a working
|
||||
[portal](https://project.uhhm.no/uhhm/portal) content repo: a question
|
||||
series for every role, the state machines behind them, and a desk per
|
||||
handling role. No software is written for the business; the only thing
|
||||
produced is content, and every line of it is held to a verifier.
|
||||
|
||||
## The loop
|
||||
## How it works
|
||||
|
||||
```
|
||||
interview ─► needs.yaml ─► pages + aggregates + desks
|
||||
│ │
|
||||
│ question_lint (structure: pass/fail)
|
||||
│ │
|
||||
└─► personas ─► tasks.jsonl ─► answering engine ─► answers.jsonl
|
||||
│
|
||||
question_lint --needs-score ◄──┘
|
||||
│
|
||||
misroutes = wording defects ─► revise pages
|
||||
intake (plain words)
|
||||
│
|
||||
▼ phase 1 frozen after this phase: the generator
|
||||
needs.yaml ─────────────────────── may not weaken the spec to pass
|
||||
│
|
||||
▼ phase 2 ◄── question_lint findings, until it exits 0
|
||||
aggregates.yaml + questions/** + desks
|
||||
│
|
||||
▼ phase 3 ◄── misroutes from a blind visitor model
|
||||
wording
|
||||
```
|
||||
|
||||
- **`needs.yaml`** lives in the business's own content repo. It says
|
||||
who wants what, which bucket the answer lands in, which group
|
||||
carries it to a finished state, and what the visitor will tolerate
|
||||
in submissions and required fields.
|
||||
- **The verifier is portal's `question_lint`**, not code in this repo.
|
||||
It reads portal's own content types and ships in every portal
|
||||
release, so a content repo's CI enforces its needs with no new
|
||||
dependency. Structure is deterministic and gates CI. Wording is
|
||||
graded, and gates only if you pass `--min-accuracy`.
|
||||
- **This repo holds what sits around the verifier**: the trainer
|
||||
procedure (`skill/SKILL.md`), sector specs to start from
|
||||
(`sectors/`), and the runs (`runs/`).
|
||||
1. **Needs.** The intake becomes `needs.yaml`: one need per kind of
|
||||
person and thing they want, including the roles inside the
|
||||
business. Each names the bucket the answer lands in, the group that
|
||||
handles it, the states that count as finished, and the effort the
|
||||
visitor will tolerate.
|
||||
2. **Structure.** Pages, state machines and desks are generated, then
|
||||
revised against portal's `question_lint` until every need is met:
|
||||
a path within budget, a desk held by the right group, every
|
||||
finished state reachable, no record stranding. The page-writing
|
||||
model sees the needs and never the personas.
|
||||
3. **Wording.** A separate model plays each persona, blind, first with
|
||||
headings only and then with descriptions. A misroute is a wording
|
||||
defect and goes back to the generator. A rewrite that breaks
|
||||
structure is reverted.
|
||||
|
||||
Model output is only ever written to `aggregates.yaml`, `site.yaml`
|
||||
and `questions/**.yaml` inside the output directory.
|
||||
|
||||
```
|
||||
question_lint --path <repo>/questions # structure
|
||||
question_lint --path <repo>/questions --needs-tasks tasks.jsonl # full wording
|
||||
question_lint --path <repo>/questions --needs-tasks skim.jsonl --skim # headings only
|
||||
question_lint --path <repo>/questions --needs-score answers.jsonl [--min-accuracy 0.8]
|
||||
portal-trainer generate --intake intakes/contractor.yaml --out out/nordvik \
|
||||
--lint /srv/app/<inst>/current/question_lint --llm engines/ollama.sh
|
||||
portal-trainer answer --tasks tasks.jsonl --llm engines/ollama.sh > answers.jsonl
|
||||
```
|
||||
|
||||
## The engine contract
|
||||
The verifier is portal's `question_lint`, not code in this repo: it
|
||||
reads portal's own content types and ships in every portal release, so
|
||||
a generated repo's CI keeps enforcing its needs after handover.
|
||||
|
||||
A task is one page on one persona's path, as a typed `choice`:
|
||||
## LLM backends
|
||||
|
||||
```json
|
||||
{"id":"architecture-firm@/","persona":"architecture-firm","page":"/",
|
||||
"state":{"body":"We run a small architecture firm and ..."},
|
||||
"questions":{"pick":{"type":"choice",
|
||||
"instructions":"A visitor reads the page question \"What are you here for?\". Which alternative do they choose?",
|
||||
"criteria":{"<alternative heading>":"<its description>", "...":"..."}}},
|
||||
"expect":["<every alternative that still meets the need>"]}
|
||||
```
|
||||
A backend is any command that takes a prompt on stdin and prints text.
|
||||
|
||||
Strip `expect` (and `need`) before an engine sees it. An answer is one
|
||||
line: `{"id": "...", "choice": "<heading, verbatim>", "confidence": 0.0-1.0}`.
|
||||
`state` and `questions` are exactly the arguments of
|
||||
[laya](https://github.com/NandhaKishorM/laya)'s
|
||||
`router.predict(state, questions)`, so a laya adapter is a loop over
|
||||
the file; an LLM adapter is a prompt around the same two fields.
|
||||
|
||||
## Engines, and what is known about them
|
||||
|
||||
| Engine | Status | What it is good for |
|
||||
|---|---|---|
|
||||
| LLM, blind (no `expect`) | used for the first run | Reads like a visitor; slow and costs per task, so use it to find defects, not to gate CI. |
|
||||
| laya `english` (ModernBERT-large, 421M) | not run yet | 33 ms per question, so it can gate CI and score thousands of generated variants. Its authors measure 0.78 intent accuracy in English. |
|
||||
| laya `multilingual` | not run yet | Its authors' own sweep puts Norwegian Bokmål at **0.53 accuracy with 0.86 mean confidence**. It is confidently wrong too often to grade Norwegian wording without fine-tuning. Test a Norwegian site in English translation, or with an LLM. |
|
||||
|
||||
An engine is a measuring instrument. Before trusting one on a sector,
|
||||
score it on tasks whose right answer nobody disputes; an engine that
|
||||
misses those is measuring itself, not the page.
|
||||
|
||||
## First run: uhhm.no, 2026-09-21
|
||||
|
||||
Nine personas against the live uhhm.no front door, answered by a small
|
||||
LLM that never saw `expect`. One run each; eight tasks; treat as a
|
||||
lead, not a measurement.
|
||||
|
||||
| What the engine could read | Routed right |
|
||||
| Backend | Use |
|
||||
|---|---|
|
||||
| Headings and descriptions | 7 of 8 |
|
||||
| Headings only (`--skim`) | 5 of 8 |
|
||||
| `engines/ollama.sh` | Local Ollama. `MODEL=qwen3:8b` answers a task in about two seconds on ergo's GPU and is the default visitor. Generation wants a larger model (`MODEL=qwen3.6:27b`), which runs mostly on CPU there. |
|
||||
| `engines/anthropic.sh` | The Anthropic API, given a working `ANTHROPIC_API_KEY`. |
|
||||
| `engines/mailbox.sh` | Writes each prompt to a directory and waits for a reply file: drive the generator from an agent session, or by hand. |
|
||||
|
||||
- A founder who wants a first version built picked **"Work happens
|
||||
through dialogue, not tickets"** - the collaborator door - in both
|
||||
modes. With headings only, so did a firm wanting to pay for storage
|
||||
and backups. The heading reads as how UHHM works with clients.
|
||||
- With headings only, a student seeking an internship picked
|
||||
**"Attention is earned"**.
|
||||
- Structure: four needs met. The site-improvement flow is advertised
|
||||
and `disabled`, so it is declared `planned`.
|
||||
The visitor and the generator should be different models. A model
|
||||
grading its own wording agrees with itself.
|
||||
|
||||
## Sectors
|
||||
## The onboarding site
|
||||
|
||||
A sector file is a needs spec with no pages behind it: a failing test
|
||||
suite for the trainer to make pass, carrying what the sector demands
|
||||
(why a lead is a pipeline, why a deviation report gets three fields).
|
||||
`portal-portal/` is the front end of this: a portal content repo whose
|
||||
front door is the intake interview. A submission lands in
|
||||
`onboardings` (`open → drafted ⇄ revising → live | declined`) and is
|
||||
worked from an owners' desk. Today the desk step is a person running
|
||||
`generate` and sending the link; the intake record already carries
|
||||
every field the generator reads, so the step that remains is a
|
||||
listener on `portal.answers.submitted` that runs it and pushes the
|
||||
draft to a new repo. It passes its own `needs.yaml`.
|
||||
|
||||
- `sectors/software-studio/needs.yaml` - UHHM's own, and green against
|
||||
`uhhm/questions`.
|
||||
- `sectors/construction/needs.yaml` - a contractor with project
|
||||
managers, a safety officer, crew and subcontractors: winning survey
|
||||
and design work, vetting subcontractors, requesting and answering
|
||||
bids, hiring, deviation reporting. No pages yet.
|
||||
## Measured so far
|
||||
|
||||
**Generated: a building contractor** (`runs/contractor-2026-09-21/`),
|
||||
from `intakes/contractor.yaml`, a Sonnet-class model generating.
|
||||
|
||||
- Phase 1 derived six needs from the owner's prose, including one
|
||||
nobody asked for: a project manager logging a phone enquiry, taken
|
||||
from "enquiries arrive by phone, email and text and get lost".
|
||||
- Phase 2 was green on the first round: 14 files, four state machines
|
||||
(`enquiries: open → quoted → won | lost`, `subcontractors` with an
|
||||
`awaiting_papers` loop, `applicants`, `site_issues`), two desks.
|
||||
- Phase 3, its own personas: 10 of 10 in both modes. That number is
|
||||
flattering, because in that run the pages were written with the
|
||||
personas in view. Against ten **held-out** personas, with qwen3:8b
|
||||
as the visitor:
|
||||
|
||||
| Visitor could read | Routed right |
|
||||
|---|---|
|
||||
| Headings and descriptions | 10 of 10 |
|
||||
| Headings only | 8 of 10 |
|
||||
|
||||
A scaffolding firm asking "how do I get to do jobs for you?" chose
|
||||
"Ask about working with us" (the hiring door). An attic conversion
|
||||
chose "Get someone to look at a building". The generator has since
|
||||
been changed to hide personas from the page-writing phase.
|
||||
|
||||
**Existing site: uhhm.no** (`runs/uhhm-2026-09-21/`), eight tasks.
|
||||
|
||||
| Visitor model | With descriptions | Headings only |
|
||||
|---|---|---|
|
||||
| small LLM, blind | 7 of 8 | 5 of 8 |
|
||||
| qwen3:8b (Ollama) | 7 of 8 | 7 of 8 |
|
||||
| granite4.1:8b (Ollama) | 7 of 8 | 6 of 8 |
|
||||
|
||||
All three send a paying client through **"Work happens through
|
||||
dialogue, not tickets"**, the collaborator door. Different models,
|
||||
same defect: that is what a wording problem looks like.
|
||||
|
||||
Small numbers, one run each. Leads, not measurements.
|
||||
|
||||
## What else is here
|
||||
|
||||
- `skill/SKILL.md` - the same procedure for an agent or a person
|
||||
working by hand.
|
||||
- `sectors/` - needs specs to start from. `construction/` doubles as
|
||||
the held-out persona set above.
|
||||
- `generator/reference.md` - everything the generating model is told
|
||||
about portal content. When the lint rejects something the reference
|
||||
did not warn about, the fix belongs there.
|
||||
|
||||
## Toward a trained model
|
||||
|
||||
Nothing here trains weights yet, on purpose. The order that makes
|
||||
training possible:
|
||||
|
||||
1. The verifier has to be trusted first. It is the reward. A generator
|
||||
trained against a judge that is wrong half the time learns the
|
||||
judge.
|
||||
2. Every onboarding leaves a run: needs, the pages at each revision,
|
||||
the scores. That corpus - what wording routed which persona right,
|
||||
per sector - is the training data, and it does not exist until the
|
||||
loop has been run by hand a few dozen times.
|
||||
3. With a fast engine (laya-class) as the scorer, generating and
|
||||
scoring many page variants per need is cheap, which is what makes
|
||||
search, and later fine-tuning a small generator on the winners,
|
||||
practical.
|
||||
Nothing here trains weights yet. What would make it possible is
|
||||
accumulating: every run leaves the intake, the needs, the pages at
|
||||
each revision and the scores. With a fast local visitor as the scorer,
|
||||
generating many variants per need and keeping the winners is cheap,
|
||||
and those winners are the fine-tuning set for a small generator. The
|
||||
verifier has to be trusted before any of that: a generator trained
|
||||
against a judge that is often wrong learns the judge.
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
aggregates:
|
||||
- bucket: enquiries
|
||||
initial: open
|
||||
states:
|
||||
open: { event: received }
|
||||
quoted: { event: quoted }
|
||||
won: { event: won }
|
||||
lost: { event: lost }
|
||||
transitions:
|
||||
open: [quoted, lost]
|
||||
quoted: [won, lost]
|
||||
|
||||
- bucket: subcontractors
|
||||
initial: open
|
||||
states:
|
||||
open: { event: applied }
|
||||
awaiting_papers: { event: papers_requested }
|
||||
approved: { event: approved }
|
||||
declined: { event: declined }
|
||||
transitions:
|
||||
open: [awaiting_papers, approved, declined]
|
||||
awaiting_papers: [approved, declined]
|
||||
|
||||
- bucket: applicants
|
||||
initial: open
|
||||
states:
|
||||
open: { event: applied }
|
||||
interviewing: { event: invited }
|
||||
hired: { event: hired }
|
||||
declined: { event: declined }
|
||||
transitions:
|
||||
open: [interviewing, declined]
|
||||
interviewing: [hired, declined]
|
||||
|
||||
- bucket: site_issues
|
||||
initial: open
|
||||
states:
|
||||
open: { event: reported }
|
||||
in_hand: { event: assessed }
|
||||
closed: { event: closed }
|
||||
transitions:
|
||||
open: [in_hand]
|
||||
in_hand: [closed]
|
||||
@@ -0,0 +1,10 @@
|
||||
{"id":"housing-board-cracks@/","choice":"Get someone to look at a building","confidence":0.93}
|
||||
{"id":"homeowner-leaking-roof@/","choice":"Get someone to look at a building","confidence":0.92}
|
||||
{"id":"homeowner-extension@/","choice":"Get a price for a build","confidence":0.72}
|
||||
{"id":"owner-basement-conversion@/","choice":"Get a price for a build","confidence":0.72}
|
||||
{"id":"electrician-more-work@/","choice":"Join our subcontractor list","confidence":0.9}
|
||||
{"id":"scaffolding-firm@/","choice":"Join our subcontractor list","confidence":0.9}
|
||||
{"id":"apprentice-asking@/","choice":"Ask about working with us","confidence":0.62}
|
||||
{"id":"experienced-carpenter@/","choice":"Ask about working with us","confidence":0.62}
|
||||
{"id":"crew-loose-scaffold@/","choice":"Report something from site","confidence":0.92}
|
||||
{"id":"subcontractor-wrong-delivery@/","choice":"Report something from site","confidence":0.88}
|
||||
@@ -0,0 +1,10 @@
|
||||
{"id":"housing-board-cracks@/","choice":"Get someone to look at a building","confidence":0.97}
|
||||
{"id":"homeowner-leaking-roof@/","choice":"Get someone to look at a building","confidence":0.96}
|
||||
{"id":"homeowner-extension@/","choice":"Get a price for a build","confidence":0.95}
|
||||
{"id":"owner-basement-conversion@/","choice":"Get a price for a build","confidence":0.95}
|
||||
{"id":"electrician-more-work@/","choice":"Join our subcontractor list","confidence":0.97}
|
||||
{"id":"scaffolding-firm@/","choice":"Join our subcontractor list","confidence":0.97}
|
||||
{"id":"apprentice-asking@/","choice":"Ask about working with us","confidence":0.96}
|
||||
{"id":"experienced-carpenter@/","choice":"Ask about working with us","confidence":0.95}
|
||||
{"id":"crew-loose-scaffold@/","choice":"Report something from site","confidence":0.95}
|
||||
{"id":"subcontractor-wrong-delivery@/","choice":"Report something from site","confidence":0.93}
|
||||
@@ -0,0 +1,124 @@
|
||||
needs:
|
||||
- id: survey-enquiry
|
||||
who: a housing board member or private owner with a problem in a building
|
||||
wants: someone from Nordvik Bygg to come and look at the building and tell them what a fix would cost
|
||||
via: Get someone to look at a building
|
||||
lands_in: enquiries
|
||||
handled_by: project_managers
|
||||
done_when: [won, lost]
|
||||
max_steps: 1
|
||||
max_fields: 4
|
||||
|
||||
- id: build-price-enquiry
|
||||
who: an owner who already knows what they want built
|
||||
wants: drawings, a permit application and a price for the work
|
||||
via: Get a price for a build
|
||||
lands_in: enquiries
|
||||
handled_by: project_managers
|
||||
done_when: [won, lost]
|
||||
max_steps: 1
|
||||
max_fields: 5
|
||||
|
||||
- id: subcontractor-application
|
||||
who: a trade firm doing electrical, plumbing or scaffolding work
|
||||
wants: to get on Nordvik Bygg's list of subcontractors they call for work
|
||||
lands_in: subcontractors
|
||||
handled_by: project_managers
|
||||
done_when: [approved, declined]
|
||||
max_steps: 1
|
||||
max_fields: 5
|
||||
|
||||
- id: job-application
|
||||
who: a carpenter or apprentice looking for work
|
||||
wants: to find out if Nordvik Bygg is hiring and put themselves forward
|
||||
lands_in: applicants
|
||||
handled_by: project_managers
|
||||
done_when: [hired, declined]
|
||||
max_steps: 1
|
||||
max_fields: 4
|
||||
|
||||
- id: report-site-issue
|
||||
who: a crew member on site, ours or a subcontractor's
|
||||
wants: to flag a hazard, a near miss or wrong materials fast, from their phone
|
||||
lands_in: site_issues
|
||||
handled_by: safety_officer
|
||||
done_when: [closed]
|
||||
max_steps: 1
|
||||
max_fields: 3
|
||||
|
||||
- id: log-phone-enquiry
|
||||
who: a project manager who just took a call, email or text about a building
|
||||
wants: to get the enquiry into the system before it gets lost
|
||||
enters: /desk/phone-enquiry
|
||||
enters_as: project_managers
|
||||
lands_in: enquiries
|
||||
handled_by: project_managers
|
||||
done_when: [won, lost]
|
||||
max_steps: 1
|
||||
max_fields: 5
|
||||
|
||||
personas:
|
||||
- id: housing-board-cracks
|
||||
need: survey-enquiry
|
||||
text: >
|
||||
There are cracks running up the outside wall of our building and none
|
||||
of us know if it's serious. We just want someone qualified to come
|
||||
look at it and tell us what we're dealing with.
|
||||
|
||||
- id: homeowner-leaking-roof
|
||||
need: survey-enquiry
|
||||
text: >
|
||||
Water's coming through the ceiling every time it rains. I don't know
|
||||
if it's the roof or something else, I just want someone to come out
|
||||
and have a look before it gets worse.
|
||||
|
||||
- id: homeowner-extension
|
||||
need: build-price-enquiry
|
||||
text: >
|
||||
We want to add a room above the garage. We know roughly what we want,
|
||||
we just need someone to draw it up, sort the paperwork with the
|
||||
municipality, and tell us what it will cost.
|
||||
|
||||
- id: owner-basement-conversion
|
||||
need: build-price-enquiry
|
||||
text: >
|
||||
I'd like to turn the basement into a flat. Need drawings, the permit
|
||||
sorted, and a proper price before I commit to anything.
|
||||
|
||||
- id: electrician-more-work
|
||||
need: subcontractor-application
|
||||
text: >
|
||||
We're a small electrical firm and we'd like to pick up more building
|
||||
work. We're registered and insured, just need to know who to talk to
|
||||
about getting on your books.
|
||||
|
||||
- id: scaffolding-firm
|
||||
need: subcontractor-application
|
||||
text: >
|
||||
We put up and take down scaffolding for building sites. We'd like to
|
||||
be one of the firms you call when a job needs it.
|
||||
|
||||
- id: apprentice-asking
|
||||
need: job-application
|
||||
text: >
|
||||
I'm in my second year as an apprentice carpenter and looking for a
|
||||
firm that'll keep me on after. Are you taking anyone on right now?
|
||||
|
||||
- id: experienced-carpenter
|
||||
need: job-application
|
||||
text: >
|
||||
I've been doing carpentry for eight years, mostly older buildings.
|
||||
Wondered if you had any openings on site.
|
||||
|
||||
- id: crew-loose-scaffold
|
||||
need: report-site-issue
|
||||
text: >
|
||||
Noticed a scaffold board that's not sitting right, feels loose when
|
||||
you step on it. Wanted to flag it straight away before someone gets
|
||||
hurt, but I've got gloves on and no time for a long form.
|
||||
|
||||
- id: subcontractor-wrong-delivery
|
||||
need: report-site-issue
|
||||
text: >
|
||||
The delivery this morning was the wrong type of insulation, not what
|
||||
was on the drawings. Someone needs to know before it gets used.
|
||||
@@ -0,0 +1,9 @@
|
||||
name: What happens with your application now?
|
||||
description: >
|
||||
A project manager reads every application. If it looks like a good fit
|
||||
we'll be in touch to arrange an interview.
|
||||
alternatives:
|
||||
- name: Back to the start
|
||||
description: Return to the front page.
|
||||
action: /
|
||||
consequence: [Back]
|
||||
@@ -0,0 +1 @@
|
||||
qualifies: project_managers
|
||||
@@ -0,0 +1,58 @@
|
||||
name: What came in?
|
||||
responsible: { name: Ingrid Nordvik, contact: ingrid@nordvikbygg.example }
|
||||
alternatives:
|
||||
- name: Enquiries
|
||||
description: Move each enquiry on as you work it.
|
||||
action: /desk
|
||||
consequence: [Update]
|
||||
features:
|
||||
- name: ""
|
||||
description: ""
|
||||
resource:
|
||||
source: { kind: kv, bucket: enquiries }
|
||||
requires_group: project_managers
|
||||
transitions:
|
||||
- { to: quoted, label: Quote sent }
|
||||
- { to: lost, label: Not for us }
|
||||
- { from: quoted, to: won, label: Won }
|
||||
- { from: quoted, to: lost, label: Lost }
|
||||
|
||||
- name: Subcontractors
|
||||
description: Check papers and approve or decline each application.
|
||||
action: /desk
|
||||
consequence: [Update]
|
||||
features:
|
||||
- name: ""
|
||||
description: ""
|
||||
resource:
|
||||
source: { kind: kv, bucket: subcontractors }
|
||||
requires_group: project_managers
|
||||
transitions:
|
||||
- { to: awaiting_papers, label: Ask for missing papers }
|
||||
- { to: approved, label: Approve }
|
||||
- { to: declined, label: Decline }
|
||||
- { from: awaiting_papers, to: approved, label: Approve }
|
||||
- { from: awaiting_papers, to: declined, label: Decline }
|
||||
|
||||
- name: Applicants
|
||||
description: Move each job application through interview to a decision.
|
||||
action: /desk
|
||||
consequence: [Update]
|
||||
features:
|
||||
- name: ""
|
||||
description: ""
|
||||
resource:
|
||||
source: { kind: kv, bucket: applicants }
|
||||
requires_group: project_managers
|
||||
transitions:
|
||||
- { to: interviewing, label: Invite to interview }
|
||||
- { to: declined, label: Decline }
|
||||
- { from: interviewing, to: hired, label: Hire }
|
||||
- { from: interviewing, to: declined, label: Decline }
|
||||
|
||||
- name: Log a call, email or text
|
||||
description: >
|
||||
Get an enquiry that came in by phone, email or text into the system
|
||||
before it's lost.
|
||||
action: /desk/phone-enquiry
|
||||
consequence: [Log it]
|
||||
@@ -0,0 +1,9 @@
|
||||
name: What happens with this enquiry now?
|
||||
description: >
|
||||
It's in with the rest of the enquiries on the desk, ready to work the
|
||||
same way as one that came in through the front page.
|
||||
alternatives:
|
||||
- name: Back to the start
|
||||
description: Return to the front page.
|
||||
action: /
|
||||
consequence: [Back]
|
||||
@@ -0,0 +1,20 @@
|
||||
name: What did they tell you?
|
||||
description: >
|
||||
Get it down before it gets lost. This creates the same kind of record
|
||||
as one submitted through the front page.
|
||||
responsible: { name: Ingrid Nordvik, contact: ingrid@nordvikbygg.example }
|
||||
alternatives:
|
||||
- name: Log this enquiry
|
||||
description: ""
|
||||
action: /desk/phone-enquiry-logged
|
||||
consequence: [Save]
|
||||
record_as: enquiries
|
||||
features:
|
||||
- name: About the caller and the building
|
||||
description: ""
|
||||
requirements:
|
||||
- { name: caller_name, label: Their name, type: text }
|
||||
- { name: contact, label: Phone or email, type: text }
|
||||
- { name: address, label: Address of the building, type: text }
|
||||
- { name: problem, label: What they told you, type: textarea }
|
||||
- { name: urgency, label: How soon, type: select, options: [This week, This month, No rush] }
|
||||
@@ -0,0 +1,11 @@
|
||||
name: What happens with your enquiry now?
|
||||
description: >
|
||||
One of our two project managers reads every enquiry as it comes in.
|
||||
We'll usually be in touch within a couple of working days to arrange a
|
||||
look at the building, or to say plainly if it's not something we take
|
||||
on.
|
||||
alternatives:
|
||||
- name: Back to the start
|
||||
description: Return to the front page.
|
||||
action: /
|
||||
consequence: [Back]
|
||||
@@ -0,0 +1,85 @@
|
||||
name: What brings you here?
|
||||
description: >
|
||||
Pick what best matches why you're here today.
|
||||
responsible: { name: Ingrid Nordvik, contact: ingrid@nordvikbygg.example }
|
||||
alternatives:
|
||||
- name: Get someone to look at a building
|
||||
description: >
|
||||
For housing boards and private owners with a problem in a building
|
||||
who want us to come and take a look.
|
||||
action: /enquiries/thanks
|
||||
consequence: [Send]
|
||||
record_as: enquiries
|
||||
features:
|
||||
- name: About you and the building
|
||||
description: ""
|
||||
requirements:
|
||||
- { name: name, label: Your name, type: text }
|
||||
- { name: email, label: Email, type: email }
|
||||
- { name: address, label: Address of the building, type: text }
|
||||
- { name: problem, label: What's wrong, type: textarea }
|
||||
|
||||
- name: Get a price for a build
|
||||
description: >
|
||||
For owners who already know what they want built and need drawings,
|
||||
a permit application and a price.
|
||||
action: /enquiries/thanks
|
||||
consequence: [Send]
|
||||
record_as: enquiries
|
||||
features:
|
||||
- name: About you and the build
|
||||
description: ""
|
||||
requirements:
|
||||
- { name: name, label: Your name, type: text }
|
||||
- { name: email, label: Email, type: email }
|
||||
- { name: address, label: Address of the site, type: text }
|
||||
- { name: project, label: What you want built, type: textarea }
|
||||
- { name: timeframe, label: When you'd like to start, type: select, options: [As soon as possible, Within a year, Just exploring] }
|
||||
|
||||
- name: Join our subcontractor list
|
||||
description: >
|
||||
For electrical, plumbing and scaffolding firms who want to be one of
|
||||
the firms we call when a job needs them.
|
||||
action: /subcontractors/thanks
|
||||
consequence: [Apply]
|
||||
record_as: subcontractors
|
||||
features:
|
||||
- name: About your firm
|
||||
description: ""
|
||||
requirements:
|
||||
- { name: company_name, label: Company name, type: text }
|
||||
- { name: contact_email, label: Email, type: email }
|
||||
- { name: trade, label: Trade, type: select, options: [Electrical, Plumbing, Scaffolding] }
|
||||
- { name: registration_number, label: Company registration number, type: text }
|
||||
- { name: insurance, label: Insurance policy details, type: text }
|
||||
- { name: trade_approval, label: Trade approval reference, optional: true }
|
||||
|
||||
- name: Ask about working with us
|
||||
description: >
|
||||
For carpenters and apprentices who want to know if we're hiring.
|
||||
action: /applicants/thanks
|
||||
consequence: [Send]
|
||||
record_as: applicants
|
||||
features:
|
||||
- name: About you
|
||||
description: ""
|
||||
requirements:
|
||||
- { name: name, label: Your name, type: text }
|
||||
- { name: email, label: Email, type: email }
|
||||
- { name: role, label: What you do, type: select, options: [Carpenter, Apprentice carpenter, Other] }
|
||||
- { name: message, label: Anything else we should know, type: textarea }
|
||||
|
||||
- name: Report something from site
|
||||
description: >
|
||||
For crew on site, ours or a subcontractor's, who've spotted a hazard,
|
||||
a near miss or the wrong materials.
|
||||
action: /site-issues/thanks
|
||||
consequence: [Report it]
|
||||
record_as: site_issues
|
||||
features:
|
||||
- name: What's happened
|
||||
description: ""
|
||||
requirements:
|
||||
- { name: issue_type, label: What kind of issue, type: select, options: [Hazard, Near miss, Wrong materials delivered] }
|
||||
- { name: location, label: Where on site, type: text }
|
||||
- { name: details, label: What happened, type: textarea }
|
||||
@@ -0,0 +1 @@
|
||||
qualifies: safety_officer
|
||||
@@ -0,0 +1,16 @@
|
||||
name: What's been reported from site?
|
||||
responsible: { name: Ingrid Nordvik, contact: ingrid@nordvikbygg.example }
|
||||
alternatives:
|
||||
- name: Site issues
|
||||
description: Decide what needs doing, then close it out once it's fixed.
|
||||
action: /safety
|
||||
consequence: [Update]
|
||||
features:
|
||||
- name: ""
|
||||
description: ""
|
||||
resource:
|
||||
source: { kind: kv, bucket: site_issues }
|
||||
requires_group: safety_officer
|
||||
transitions:
|
||||
- { to: in_hand, label: Look into it }
|
||||
- { from: in_hand, to: closed, label: Mark fixed }
|
||||
@@ -0,0 +1,9 @@
|
||||
name: What happens with your report now?
|
||||
description: >
|
||||
Our safety officer sees every report as it comes in and decides what
|
||||
needs to be done. You'll see it marked fixed once it's sorted.
|
||||
alternatives:
|
||||
- name: Back to the start
|
||||
description: Return to the front page.
|
||||
action: /
|
||||
consequence: [Back]
|
||||
@@ -0,0 +1,10 @@
|
||||
name: What happens with your application now?
|
||||
description: >
|
||||
A project manager checks your company registration, trade approval and
|
||||
insurance. If anything's missing we'll come back to you for it before
|
||||
we can put you on the list.
|
||||
alternatives:
|
||||
- name: Back to the start
|
||||
description: Return to the front page.
|
||||
action: /
|
||||
consequence: [Back]
|
||||
@@ -0,0 +1,3 @@
|
||||
needs: parsed in round 1
|
||||
structure round 1: ok=true fails=0
|
||||
wording round 0: headings only: wording: 10/10 routed right (100%) | headings and descriptions: wording: 10/10 routed right (100%)
|
||||
@@ -0,0 +1,2 @@
|
||||
title: Nordvik Bygg
|
||||
lang: en
|
||||
@@ -0,0 +1,10 @@
|
||||
{"id":"housing-board-cracks@/","persona":"housing-board-cracks","need":"survey-enquiry","page":"/","state":{"body":"There are cracks running up the outside wall of our building and none of us know if it's serious. We just want someone qualified to come look at it and tell us what we're dealing with."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"Ask about working with us","Get a price for a build":"Get a price for a build","Get someone to look at a building":"Get someone to look at a building","Join our subcontractor list":"Join our subcontractor list","Report something from site":"Report something from site"}}},"expect":["Get someone to look at a building"]}
|
||||
{"id":"homeowner-leaking-roof@/","persona":"homeowner-leaking-roof","need":"survey-enquiry","page":"/","state":{"body":"Water's coming through the ceiling every time it rains. I don't know if it's the roof or something else, I just want someone to come out and have a look before it gets worse."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"Ask about working with us","Get a price for a build":"Get a price for a build","Get someone to look at a building":"Get someone to look at a building","Join our subcontractor list":"Join our subcontractor list","Report something from site":"Report something from site"}}},"expect":["Get someone to look at a building"]}
|
||||
{"id":"homeowner-extension@/","persona":"homeowner-extension","need":"build-price-enquiry","page":"/","state":{"body":"We want to add a room above the garage. We know roughly what we want, we just need someone to draw it up, sort the paperwork with the municipality, and tell us what it will cost."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"Ask about working with us","Get a price for a build":"Get a price for a build","Get someone to look at a building":"Get someone to look at a building","Join our subcontractor list":"Join our subcontractor list","Report something from site":"Report something from site"}}},"expect":["Get a price for a build"]}
|
||||
{"id":"owner-basement-conversion@/","persona":"owner-basement-conversion","need":"build-price-enquiry","page":"/","state":{"body":"I'd like to turn the basement into a flat. Need drawings, the permit sorted, and a proper price before I commit to anything."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"Ask about working with us","Get a price for a build":"Get a price for a build","Get someone to look at a building":"Get someone to look at a building","Join our subcontractor list":"Join our subcontractor list","Report something from site":"Report something from site"}}},"expect":["Get a price for a build"]}
|
||||
{"id":"electrician-more-work@/","persona":"electrician-more-work","need":"subcontractor-application","page":"/","state":{"body":"We're a small electrical firm and we'd like to pick up more building work. We're registered and insured, just need to know who to talk to about getting on your books."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"Ask about working with us","Get a price for a build":"Get a price for a build","Get someone to look at a building":"Get someone to look at a building","Join our subcontractor list":"Join our subcontractor list","Report something from site":"Report something from site"}}},"expect":["Join our subcontractor list"]}
|
||||
{"id":"scaffolding-firm@/","persona":"scaffolding-firm","need":"subcontractor-application","page":"/","state":{"body":"We put up and take down scaffolding for building sites. We'd like to be one of the firms you call when a job needs it."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"Ask about working with us","Get a price for a build":"Get a price for a build","Get someone to look at a building":"Get someone to look at a building","Join our subcontractor list":"Join our subcontractor list","Report something from site":"Report something from site"}}},"expect":["Join our subcontractor list"]}
|
||||
{"id":"apprentice-asking@/","persona":"apprentice-asking","need":"job-application","page":"/","state":{"body":"I'm in my second year as an apprentice carpenter and looking for a firm that'll keep me on after. Are you taking anyone on right now?"},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"Ask about working with us","Get a price for a build":"Get a price for a build","Get someone to look at a building":"Get someone to look at a building","Join our subcontractor list":"Join our subcontractor list","Report something from site":"Report something from site"}}},"expect":["Ask about working with us"]}
|
||||
{"id":"experienced-carpenter@/","persona":"experienced-carpenter","need":"job-application","page":"/","state":{"body":"I've been doing carpentry for eight years, mostly older buildings. Wondered if you had any openings on site."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"Ask about working with us","Get a price for a build":"Get a price for a build","Get someone to look at a building":"Get someone to look at a building","Join our subcontractor list":"Join our subcontractor list","Report something from site":"Report something from site"}}},"expect":["Ask about working with us"]}
|
||||
{"id":"crew-loose-scaffold@/","persona":"crew-loose-scaffold","need":"report-site-issue","page":"/","state":{"body":"Noticed a scaffold board that's not sitting right, feels loose when you step on it. Wanted to flag it straight away before someone gets hurt, but I've got gloves on and no time for a long form."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"Ask about working with us","Get a price for a build":"Get a price for a build","Get someone to look at a building":"Get someone to look at a building","Join our subcontractor list":"Join our subcontractor list","Report something from site":"Report something from site"}}},"expect":["Report something from site"]}
|
||||
{"id":"subcontractor-wrong-delivery@/","persona":"subcontractor-wrong-delivery","need":"report-site-issue","page":"/","state":{"body":"The delivery this morning was the wrong type of insulation, not what was on the drawings. Someone needs to know before it gets used."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"Ask about working with us","Get a price for a build":"Get a price for a build","Get someone to look at a building":"Get someone to look at a building","Join our subcontractor list":"Join our subcontractor list","Report something from site":"Report something from site"}}},"expect":["Report something from site"]}
|
||||
@@ -0,0 +1,10 @@
|
||||
{"id":"housing-board-cracks@/","persona":"housing-board-cracks","need":"survey-enquiry","page":"/","state":{"body":"There are cracks running up the outside wall of our building and none of us know if it's serious. We just want someone qualified to come look at it and tell us what we're dealing with."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"For carpenters and apprentices who want to know if we're hiring.","Get a price for a build":"For owners who already know what they want built and need drawings, a permit application and a price.","Get someone to look at a building":"For housing boards and private owners with a problem in a building who want us to come and take a look.","Join our subcontractor list":"For electrical, plumbing and scaffolding firms who want to be one of the firms we call when a job needs them.","Report something from site":"For crew on site, ours or a subcontractor's, who've spotted a hazard, a near miss or the wrong materials."}}},"expect":["Get someone to look at a building"]}
|
||||
{"id":"homeowner-leaking-roof@/","persona":"homeowner-leaking-roof","need":"survey-enquiry","page":"/","state":{"body":"Water's coming through the ceiling every time it rains. I don't know if it's the roof or something else, I just want someone to come out and have a look before it gets worse."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"For carpenters and apprentices who want to know if we're hiring.","Get a price for a build":"For owners who already know what they want built and need drawings, a permit application and a price.","Get someone to look at a building":"For housing boards and private owners with a problem in a building who want us to come and take a look.","Join our subcontractor list":"For electrical, plumbing and scaffolding firms who want to be one of the firms we call when a job needs them.","Report something from site":"For crew on site, ours or a subcontractor's, who've spotted a hazard, a near miss or the wrong materials."}}},"expect":["Get someone to look at a building"]}
|
||||
{"id":"homeowner-extension@/","persona":"homeowner-extension","need":"build-price-enquiry","page":"/","state":{"body":"We want to add a room above the garage. We know roughly what we want, we just need someone to draw it up, sort the paperwork with the municipality, and tell us what it will cost."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"For carpenters and apprentices who want to know if we're hiring.","Get a price for a build":"For owners who already know what they want built and need drawings, a permit application and a price.","Get someone to look at a building":"For housing boards and private owners with a problem in a building who want us to come and take a look.","Join our subcontractor list":"For electrical, plumbing and scaffolding firms who want to be one of the firms we call when a job needs them.","Report something from site":"For crew on site, ours or a subcontractor's, who've spotted a hazard, a near miss or the wrong materials."}}},"expect":["Get a price for a build"]}
|
||||
{"id":"owner-basement-conversion@/","persona":"owner-basement-conversion","need":"build-price-enquiry","page":"/","state":{"body":"I'd like to turn the basement into a flat. Need drawings, the permit sorted, and a proper price before I commit to anything."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"For carpenters and apprentices who want to know if we're hiring.","Get a price for a build":"For owners who already know what they want built and need drawings, a permit application and a price.","Get someone to look at a building":"For housing boards and private owners with a problem in a building who want us to come and take a look.","Join our subcontractor list":"For electrical, plumbing and scaffolding firms who want to be one of the firms we call when a job needs them.","Report something from site":"For crew on site, ours or a subcontractor's, who've spotted a hazard, a near miss or the wrong materials."}}},"expect":["Get a price for a build"]}
|
||||
{"id":"electrician-more-work@/","persona":"electrician-more-work","need":"subcontractor-application","page":"/","state":{"body":"We're a small electrical firm and we'd like to pick up more building work. We're registered and insured, just need to know who to talk to about getting on your books."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"For carpenters and apprentices who want to know if we're hiring.","Get a price for a build":"For owners who already know what they want built and need drawings, a permit application and a price.","Get someone to look at a building":"For housing boards and private owners with a problem in a building who want us to come and take a look.","Join our subcontractor list":"For electrical, plumbing and scaffolding firms who want to be one of the firms we call when a job needs them.","Report something from site":"For crew on site, ours or a subcontractor's, who've spotted a hazard, a near miss or the wrong materials."}}},"expect":["Join our subcontractor list"]}
|
||||
{"id":"scaffolding-firm@/","persona":"scaffolding-firm","need":"subcontractor-application","page":"/","state":{"body":"We put up and take down scaffolding for building sites. We'd like to be one of the firms you call when a job needs it."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"For carpenters and apprentices who want to know if we're hiring.","Get a price for a build":"For owners who already know what they want built and need drawings, a permit application and a price.","Get someone to look at a building":"For housing boards and private owners with a problem in a building who want us to come and take a look.","Join our subcontractor list":"For electrical, plumbing and scaffolding firms who want to be one of the firms we call when a job needs them.","Report something from site":"For crew on site, ours or a subcontractor's, who've spotted a hazard, a near miss or the wrong materials."}}},"expect":["Join our subcontractor list"]}
|
||||
{"id":"apprentice-asking@/","persona":"apprentice-asking","need":"job-application","page":"/","state":{"body":"I'm in my second year as an apprentice carpenter and looking for a firm that'll keep me on after. Are you taking anyone on right now?"},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"For carpenters and apprentices who want to know if we're hiring.","Get a price for a build":"For owners who already know what they want built and need drawings, a permit application and a price.","Get someone to look at a building":"For housing boards and private owners with a problem in a building who want us to come and take a look.","Join our subcontractor list":"For electrical, plumbing and scaffolding firms who want to be one of the firms we call when a job needs them.","Report something from site":"For crew on site, ours or a subcontractor's, who've spotted a hazard, a near miss or the wrong materials."}}},"expect":["Ask about working with us"]}
|
||||
{"id":"experienced-carpenter@/","persona":"experienced-carpenter","need":"job-application","page":"/","state":{"body":"I've been doing carpentry for eight years, mostly older buildings. Wondered if you had any openings on site."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"For carpenters and apprentices who want to know if we're hiring.","Get a price for a build":"For owners who already know what they want built and need drawings, a permit application and a price.","Get someone to look at a building":"For housing boards and private owners with a problem in a building who want us to come and take a look.","Join our subcontractor list":"For electrical, plumbing and scaffolding firms who want to be one of the firms we call when a job needs them.","Report something from site":"For crew on site, ours or a subcontractor's, who've spotted a hazard, a near miss or the wrong materials."}}},"expect":["Ask about working with us"]}
|
||||
{"id":"crew-loose-scaffold@/","persona":"crew-loose-scaffold","need":"report-site-issue","page":"/","state":{"body":"Noticed a scaffold board that's not sitting right, feels loose when you step on it. Wanted to flag it straight away before someone gets hurt, but I've got gloves on and no time for a long form."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"For carpenters and apprentices who want to know if we're hiring.","Get a price for a build":"For owners who already know what they want built and need drawings, a permit application and a price.","Get someone to look at a building":"For housing boards and private owners with a problem in a building who want us to come and take a look.","Join our subcontractor list":"For electrical, plumbing and scaffolding firms who want to be one of the firms we call when a job needs them.","Report something from site":"For crew on site, ours or a subcontractor's, who've spotted a hazard, a near miss or the wrong materials."}}},"expect":["Report something from site"]}
|
||||
{"id":"subcontractor-wrong-delivery@/","persona":"subcontractor-wrong-delivery","need":"report-site-issue","page":"/","state":{"body":"The delivery this morning was the wrong type of insulation, not what was on the drawings. Someone needs to know before it gets used."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"For carpenters and apprentices who want to know if we're hiring.","Get a price for a build":"For owners who already know what they want built and need drawings, a permit application and a price.","Get someone to look at a building":"For housing boards and private owners with a problem in a building who want us to come and take a look.","Join our subcontractor list":"For electrical, plumbing and scaffolding firms who want to be one of the firms we call when a job needs them.","Report something from site":"For crew on site, ours or a subcontractor's, who've spotted a hazard, a near miss or the wrong materials."}}},"expect":["Report something from site"]}
|
||||
@@ -0,0 +1,4 @@
|
||||
needs round 1: needs.yaml parses, frozen
|
||||
structure round 1: green
|
||||
wording round 0: headings only: wording: 10/10 routed right (100%) | headings and descriptions: wording: 10/10 routed right (100%)
|
||||
content repo written to /tmp/claude-1000/-home-bl-repos-portal/b7802cea-728f-42d2-a751-680a973ba17d/scratchpad/gen/repo
|
||||
@@ -0,0 +1,10 @@
|
||||
{"id":"housing-board-damp@/","choice":"Get someone to look at a building","confidence":0.99}
|
||||
{"id":"buyer-before-purchase@/","choice":"Get someone to look at a building","confidence":0.99}
|
||||
{"id":"attic-conversion@/","choice":"Get a price for a build","confidence":0.99}
|
||||
{"id":"shop-to-flat@/","choice":"Get a price for a build","confidence":0.99}
|
||||
{"id":"electrician-firm@/","choice":"Join our subcontractor list","confidence":0.99}
|
||||
{"id":"scaffolder@/","choice":"Join our subcontractor list","confidence":0.99}
|
||||
{"id":"carpenter-jobseeker@/","choice":"Ask about working with us","confidence":0.99}
|
||||
{"id":"apprentice@/","choice":"Ask about working with us","confidence":0.99}
|
||||
{"id":"loose-railing@/","choice":"Report something from site","confidence":0.99}
|
||||
{"id":"wrong-membrane@/","choice":"Report something from site","confidence":0.99}
|
||||
@@ -0,0 +1,10 @@
|
||||
{"id":"housing-board-damp@/","choice":"Get someone to look at a building","confidence":0.95}
|
||||
{"id":"buyer-before-purchase@/","choice":"Get someone to look at a building","confidence":0.95}
|
||||
{"id":"attic-conversion@/","choice":"Get someone to look at a building","confidence":0.95}
|
||||
{"id":"shop-to-flat@/","choice":"Get a price for a build","confidence":0.95}
|
||||
{"id":"electrician-firm@/","choice":"Join our subcontractor list","confidence":0.95}
|
||||
{"id":"scaffolder@/","choice":"Ask about working with us","confidence":0.95}
|
||||
{"id":"carpenter-jobseeker@/","choice":"Ask about working with us","confidence":0.95}
|
||||
{"id":"apprentice@/","choice":"Ask about working with us","confidence":0.95}
|
||||
{"id":"loose-railing@/","choice":"Report something from site","confidence":0.95}
|
||||
{"id":"wrong-membrane@/","choice":"Report something from site","confidence":0.95}
|
||||
@@ -0,0 +1,10 @@
|
||||
{"id":"housing-board-damp@/","persona":"housing-board-damp","need":"survey-enquiry","page":"/","state":{"body":"I chair the board of a housing cooperative from the seventies. Two ground-floor flats have damp in the walls and we don't know if it's drainage or the facade. We need someone to tell us."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"For carpenters and apprentices who want to know if we're hiring.","Get a price for a build":"For owners who already know what they want built and need drawings, a permit application and a price.","Get someone to look at a building":"For housing boards and private owners with a problem in a building who want us to come and take a look.","Join our subcontractor list":"For electrical, plumbing and scaffolding firms who want to be one of the firms we call when a job needs them.","Report something from site":"For crew on site, ours or a subcontractor's, who've spotted a hazard, a near miss or the wrong materials."}}},"expect":["Get someone to look at a building"]}
|
||||
{"id":"buyer-before-purchase@/","persona":"buyer-before-purchase","need":"survey-enquiry","page":"/","state":{"body":"We are about to buy an old timber house. Before we sign we want a professional to go through it and tell us what is wrong with it."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"For carpenters and apprentices who want to know if we're hiring.","Get a price for a build":"For owners who already know what they want built and need drawings, a permit application and a price.","Get someone to look at a building":"For housing boards and private owners with a problem in a building who want us to come and take a look.","Join our subcontractor list":"For electrical, plumbing and scaffolding firms who want to be one of the firms we call when a job needs them.","Report something from site":"For crew on site, ours or a subcontractor's, who've spotted a hazard, a near miss or the wrong materials."}}},"expect":["Get someone to look at a building"]}
|
||||
{"id":"attic-conversion@/","persona":"attic-conversion","need":"build-price-enquiry","page":"/","state":{"body":"We want to turn our attic into two bedrooms and a bathroom. We need drawings and someone who handles the application to the municipality."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"For carpenters and apprentices who want to know if we're hiring.","Get a price for a build":"For owners who already know what they want built and need drawings, a permit application and a price.","Get someone to look at a building":"For housing boards and private owners with a problem in a building who want us to come and take a look.","Join our subcontractor list":"For electrical, plumbing and scaffolding firms who want to be one of the firms we call when a job needs them.","Report something from site":"For crew on site, ours or a subcontractor's, who've spotted a hazard, a near miss or the wrong materials."}}},"expect":["Get a price for a build"]}
|
||||
{"id":"shop-to-flat@/","persona":"shop-to-flat","need":"build-price-enquiry","page":"/","state":{"body":"I own a former shop on the ground floor and want to make it a flat. I have no idea what is allowed. Can you sort that out and give me a price?"},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"For carpenters and apprentices who want to know if we're hiring.","Get a price for a build":"For owners who already know what they want built and need drawings, a permit application and a price.","Get someone to look at a building":"For housing boards and private owners with a problem in a building who want us to come and take a look.","Join our subcontractor list":"For electrical, plumbing and scaffolding firms who want to be one of the firms we call when a job needs them.","Report something from site":"For crew on site, ours or a subcontractor's, who've spotted a hazard, a near miss or the wrong materials."}}},"expect":["Get a price for a build"]}
|
||||
{"id":"electrician-firm@/","persona":"electrician-firm","need":"subcontractor-application","page":"/","state":{"body":"We are a four-person electrical firm, fully certified. We would like to get on your list so you call us when you need electricians."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"For carpenters and apprentices who want to know if we're hiring.","Get a price for a build":"For owners who already know what they want built and need drawings, a permit application and a price.","Get someone to look at a building":"For housing boards and private owners with a problem in a building who want us to come and take a look.","Join our subcontractor list":"For electrical, plumbing and scaffolding firms who want to be one of the firms we call when a job needs them.","Report something from site":"For crew on site, ours or a subcontractor's, who've spotted a hazard, a near miss or the wrong materials."}}},"expect":["Join our subcontractor list"]}
|
||||
{"id":"scaffolder@/","persona":"scaffolder","need":"subcontractor-application","page":"/","state":{"body":"I run a scaffolding company. How do I get to do jobs for you?"},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"For carpenters and apprentices who want to know if we're hiring.","Get a price for a build":"For owners who already know what they want built and need drawings, a permit application and a price.","Get someone to look at a building":"For housing boards and private owners with a problem in a building who want us to come and take a look.","Join our subcontractor list":"For electrical, plumbing and scaffolding firms who want to be one of the firms we call when a job needs them.","Report something from site":"For crew on site, ours or a subcontractor's, who've spotted a hazard, a near miss or the wrong materials."}}},"expect":["Join our subcontractor list"]}
|
||||
{"id":"carpenter-jobseeker@/","persona":"carpenter-jobseeker","need":"job-application","page":"/","state":{"body":"I'm a certified carpenter with eight years on rehabilitation jobs. Are you hiring?"},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"For carpenters and apprentices who want to know if we're hiring.","Get a price for a build":"For owners who already know what they want built and need drawings, a permit application and a price.","Get someone to look at a building":"For housing boards and private owners with a problem in a building who want us to come and take a look.","Join our subcontractor list":"For electrical, plumbing and scaffolding firms who want to be one of the firms we call when a job needs them.","Report something from site":"For crew on site, ours or a subcontractor's, who've spotted a hazard, a near miss or the wrong materials."}}},"expect":["Ask about working with us"]}
|
||||
{"id":"apprentice@/","persona":"apprentice","need":"job-application","page":"/","state":{"body":"I finish vocational school this spring and need an apprenticeship as a bricklayer."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"For carpenters and apprentices who want to know if we're hiring.","Get a price for a build":"For owners who already know what they want built and need drawings, a permit application and a price.","Get someone to look at a building":"For housing boards and private owners with a problem in a building who want us to come and take a look.","Join our subcontractor list":"For electrical, plumbing and scaffolding firms who want to be one of the firms we call when a job needs them.","Report something from site":"For crew on site, ours or a subcontractor's, who've spotted a hazard, a near miss or the wrong materials."}}},"expect":["Ask about working with us"]}
|
||||
{"id":"loose-railing@/","persona":"loose-railing","need":"report-site-issue","page":"/","state":{"body":"The railing on the third level of the scaffold on the north side is loose. Nobody got hurt but someone will."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"For carpenters and apprentices who want to know if we're hiring.","Get a price for a build":"For owners who already know what they want built and need drawings, a permit application and a price.","Get someone to look at a building":"For housing boards and private owners with a problem in a building who want us to come and take a look.","Join our subcontractor list":"For electrical, plumbing and scaffolding firms who want to be one of the firms we call when a job needs them.","Report something from site":"For crew on site, ours or a subcontractor's, who've spotted a hazard, a near miss or the wrong materials."}}},"expect":["Report something from site"]}
|
||||
{"id":"wrong-membrane@/","persona":"wrong-membrane","need":"report-site-issue","page":"/","state":{"body":"The bathroom membrane delivered today is not the one in the specification. We stopped work on it."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"For carpenters and apprentices who want to know if we're hiring.","Get a price for a build":"For owners who already know what they want built and need drawings, a permit application and a price.","Get someone to look at a building":"For housing boards and private owners with a problem in a building who want us to come and take a look.","Join our subcontractor list":"For electrical, plumbing and scaffolding firms who want to be one of the firms we call when a job needs them.","Report something from site":"For crew on site, ours or a subcontractor's, who've spotted a hazard, a near miss or the wrong materials."}}},"expect":["Report something from site"]}
|
||||
@@ -0,0 +1,10 @@
|
||||
{"id":"housing-board-damp@/","persona":"housing-board-damp","need":"survey-enquiry","page":"/","state":{"body":"I chair the board of a housing cooperative from the seventies. Two ground-floor flats have damp in the walls and we don't know if it's drainage or the facade. We need someone to tell us."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"Ask about working with us","Get a price for a build":"Get a price for a build","Get someone to look at a building":"Get someone to look at a building","Join our subcontractor list":"Join our subcontractor list","Report something from site":"Report something from site"}}},"expect":["Get someone to look at a building"]}
|
||||
{"id":"buyer-before-purchase@/","persona":"buyer-before-purchase","need":"survey-enquiry","page":"/","state":{"body":"We are about to buy an old timber house. Before we sign we want a professional to go through it and tell us what is wrong with it."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"Ask about working with us","Get a price for a build":"Get a price for a build","Get someone to look at a building":"Get someone to look at a building","Join our subcontractor list":"Join our subcontractor list","Report something from site":"Report something from site"}}},"expect":["Get someone to look at a building"]}
|
||||
{"id":"attic-conversion@/","persona":"attic-conversion","need":"build-price-enquiry","page":"/","state":{"body":"We want to turn our attic into two bedrooms and a bathroom. We need drawings and someone who handles the application to the municipality."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"Ask about working with us","Get a price for a build":"Get a price for a build","Get someone to look at a building":"Get someone to look at a building","Join our subcontractor list":"Join our subcontractor list","Report something from site":"Report something from site"}}},"expect":["Get a price for a build"]}
|
||||
{"id":"shop-to-flat@/","persona":"shop-to-flat","need":"build-price-enquiry","page":"/","state":{"body":"I own a former shop on the ground floor and want to make it a flat. I have no idea what is allowed. Can you sort that out and give me a price?"},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"Ask about working with us","Get a price for a build":"Get a price for a build","Get someone to look at a building":"Get someone to look at a building","Join our subcontractor list":"Join our subcontractor list","Report something from site":"Report something from site"}}},"expect":["Get a price for a build"]}
|
||||
{"id":"electrician-firm@/","persona":"electrician-firm","need":"subcontractor-application","page":"/","state":{"body":"We are a four-person electrical firm, fully certified. We would like to get on your list so you call us when you need electricians."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"Ask about working with us","Get a price for a build":"Get a price for a build","Get someone to look at a building":"Get someone to look at a building","Join our subcontractor list":"Join our subcontractor list","Report something from site":"Report something from site"}}},"expect":["Join our subcontractor list"]}
|
||||
{"id":"scaffolder@/","persona":"scaffolder","need":"subcontractor-application","page":"/","state":{"body":"I run a scaffolding company. How do I get to do jobs for you?"},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"Ask about working with us","Get a price for a build":"Get a price for a build","Get someone to look at a building":"Get someone to look at a building","Join our subcontractor list":"Join our subcontractor list","Report something from site":"Report something from site"}}},"expect":["Join our subcontractor list"]}
|
||||
{"id":"carpenter-jobseeker@/","persona":"carpenter-jobseeker","need":"job-application","page":"/","state":{"body":"I'm a certified carpenter with eight years on rehabilitation jobs. Are you hiring?"},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"Ask about working with us","Get a price for a build":"Get a price for a build","Get someone to look at a building":"Get someone to look at a building","Join our subcontractor list":"Join our subcontractor list","Report something from site":"Report something from site"}}},"expect":["Ask about working with us"]}
|
||||
{"id":"apprentice@/","persona":"apprentice","need":"job-application","page":"/","state":{"body":"I finish vocational school this spring and need an apprenticeship as a bricklayer."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"Ask about working with us","Get a price for a build":"Get a price for a build","Get someone to look at a building":"Get someone to look at a building","Join our subcontractor list":"Join our subcontractor list","Report something from site":"Report something from site"}}},"expect":["Ask about working with us"]}
|
||||
{"id":"loose-railing@/","persona":"loose-railing","need":"report-site-issue","page":"/","state":{"body":"The railing on the third level of the scaffold on the north side is loose. Nobody got hurt but someone will."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"Ask about working with us","Get a price for a build":"Get a price for a build","Get someone to look at a building":"Get someone to look at a building","Join our subcontractor list":"Join our subcontractor list","Report something from site":"Report something from site"}}},"expect":["Report something from site"]}
|
||||
{"id":"wrong-membrane@/","persona":"wrong-membrane","need":"report-site-issue","page":"/","state":{"body":"The bathroom membrane delivered today is not the one in the specification. We stopped work on it."},"questions":{"pick":{"type":"choice","instructions":"A visitor reads the page question \"What brings you here?\". Which alternative do they choose?","criteria":{"Ask about working with us":"Ask about working with us","Get a price for a build":"Get a price for a build","Get someone to look at a building":"Get someone to look at a building","Join our subcontractor list":"Join our subcontractor list","Report something from site":"Report something from site"}}},"expect":["Report something from site"]}
|
||||
+11
-2
@@ -83,7 +83,16 @@ fn main() -> anyhow::Result<()> {
|
||||
}
|
||||
let needs = std::fs::read_to_string(opts.out.join("needs.yaml")).context("no needs.yaml was produced")?;
|
||||
|
||||
// Phase 2: structure.
|
||||
// Phase 2: structure. The page-writing model sees the needs and
|
||||
// never the personas: pages written with the test in view route
|
||||
// their own personas perfectly and strangers badly (measured:
|
||||
// 10/10 on its own personas, 8/10 headings-only on held-out ones).
|
||||
let needs_full = needs;
|
||||
let needs = needs_full
|
||||
.split("\npersonas:")
|
||||
.next()
|
||||
.unwrap_or(&needs_full)
|
||||
.to_string();
|
||||
let mut green = false;
|
||||
let mut report = String::new();
|
||||
for round in 1..=opts.rounds {
|
||||
@@ -145,7 +154,7 @@ fn main() -> anyhow::Result<()> {
|
||||
if defects.is_empty() || round == opts.wording_rounds {
|
||||
break;
|
||||
}
|
||||
let personas = needs.split("\npersonas:").nth(1).unwrap_or_default();
|
||||
let personas = needs_full.split("\npersonas:").nth(1).unwrap_or_default();
|
||||
let prompt = format!(
|
||||
"{REFERENCE}\n\n# Task\n\nThe structure is correct. Visitors are picking the wrong alternative. Each MISROUTE below is a persona who, reading the page, chose an alternative that does not meet their need; HESITANT means they chose right and nearly did not. Rewrite alternative headings first (a heading that needs its description has failed), descriptions second. Keep every `record_as`, `action`, field and state as it is. If you rename an alternative that needs.yaml names in `via`, you may not: keep that one. Return only the pages you change, each complete.\n\n## Defects\n\n```\n{defects}```\n\n## The personas\n\n```yaml\npersonas:{personas}\n```\n\n## Current files\n\n{}\n\n{FORMAT}",
|
||||
dump(&opts.out)?
|
||||
|
||||
Reference in New Issue
Block a user