Files
portal/runs/contractor-planned-2026-09-24/r2/llm/02-reply.md
T
Bendik Aagaard LynghaugandClaude Fable 5.1 4d22f4cb44 plan: a spectator role goes back to the model once; bare-word movers and unlabelled groups parse
Re-planning the contractor showed three wasted rounds: `moves_by: {
checking: submitter }` written as a bare word, a group without a
label, and the two featured owner roles left with nothing to play,
which the builder only warned about after the fact. The bare word and
the missing label now parse (a label defaults to the id), and a plan
that parses with spectator roles is sent back once with the finding;
on the contractor, round three fixed both.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 06:42:05 +02:00

4.0 KiB

business: Nordvik Bygg
language: en
contact: { name: Ingrid Nordvik, email: ingrid@nordvikbygg.example }
about: >
  We are twelve people. We survey old buildings, draw up rehabilitation
  plans, handle the permit application, and do the building work with
  our own carpenters plus subcontractors for electrical, plumbing and
  scaffolding.
mail: { from: "Nordvik Bygg <post@nordvikbygg.example>", reply_to: ingrid@nordvikbygg.example }

does:
  - id: assess-your-building
    for: building-problem
    text: We survey the building, draw up a rehabilitation plan, and handle the permit application.
  - id: build-your-project
    for: new-build-project
    text: Already know what you want built? We do the drawings, the permit and the price, then build it with our own carpenters and trusted subcontractors.

groups:
  - { id: project_managers, label: Project Managers }
  - { id: safety_officer, label: Safety Officer }
  - { id: crew, label: Crew }

needs:
  - id: building-problem
    who: housing boards and private owners with a problem with a building
    wants: someone to come and look at the building and tell them what can be done
    lands_in: enquiries
    handled_by: project_managers
    stages: [open, surveyed, quoted, won, lost]
    done_when: [won, lost]
    success: [won]
    skippable: [surveyed, quoted]
    mails: { open: submitter, won: submitter, lost: submitter }
    max_fields: 4
    collects:
      - { name: name }
      - { name: email, type: email }
      - { name: phone, type: tel }
      - { name: problem, type: textarea }
      - { name: address, optional: true, private: true }

  - id: new-build-project
    who: owners who already know what they want built
    wants: drawings, a permit and a price
    lands_in: enquiries
    handled_by: project_managers
    stages: [open, surveyed, quoted, won, lost]
    done_when: [won, lost]
    success: [won]
    skippable: [surveyed, quoted]
    mails: { open: submitter, won: submitter, lost: submitter }
    max_fields: 4
    collects:
      - { name: name }
      - { name: email, type: email }
      - { name: phone, type: tel }
      - { name: project_description, type: textarea }

  - id: subcontractor-application
    who: trade firms who want to be on the list of subcontractors
    wants: to be approved as a subcontractor
    lands_in: subcontractors
    handled_by: project_managers
    stages: [open, checking, papers_requested, approved, declined]
    done_when: [approved, declined]
    success: [approved]
    skippable: [papers_requested]
    moves_by: { checking: [submitter] }
    mails: { open: submitter, papers_requested: submitter, approved: submitter, declined: submitter }
    max_fields: 5
    collects:
      - { name: company_name }
      - { name: email, type: email }
      - { name: phone, type: tel }
      - { name: trade, type: select, options: [Electrical, Plumbing, Scaffolding, Other] }
      - { name: registration_number }
      - { name: insurance_info, type: textarea, optional: true }

  - id: job-application
    who: carpenters and apprentices asking if we are hiring
    wants: a job with us
    lands_in: job_applications
    handled_by: project_managers
    stages: [open, interviewing, hired, declined]
    done_when: [hired, declined]
    success: [hired]
    skippable: [interviewing]
    mails: { open: submitter, hired: submitter, declined: submitter }
    max_fields: 4
    collects:
      - { name: name }
      - { name: email, type: email }
      - { name: phone, type: tel }
      - { name: message, type: textarea }

  - id: report-site-issue
    who: crew, ours and the subcontractors' people, on site
    wants: to report a hazard, near miss or wrong delivery
    enters_as: crew
    lands_in: site_issues
    handled_by: safety_officer
    stages: [open, action_decided, closed]
    done_when: [closed]
    success: [closed]
    max_fields: 3
    collects:
      - { name: issue_type, type: select, options: [Hazard, Near miss, Wrong materials, Other] }
      - { name: location }
      - { name: details, type: textarea, optional: true }