Skip to content

docs(examples): two NHS practice squads sharing one assistant set - #100

Merged
dhruva-vapi merged 11 commits into
feat/blocksfrom
examples/nhs-shared-squads
Nov 21, 2026
Merged

dhruva-vapi merged 11 commits into
feat/blocksfrom
examples/nhs-shared-squads

Conversation

@dhruva-vapi

@dhruva-vapi dhruva-vapi commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

examples/nhs-shared-squads/ is a worked version of the PRISM-2684 setup: two shared assistants and one shared handoff tool, used by two practice squads that differ only in their membersOverrides. Adding another practice means adding one more squad file.

# squads/nhs-test-practice-a.yml (practice-b has the same shape with its own values)
members:
  - assistantId: nhs-test-reception
  - assistantId: nhs-test-appointments
membersOverrides:
  'tools:append':
    - type: transferCall          # per-practice, literal E.164 numbers
      destinations:
        - { type: number, number: '+442079460101' }   # urgent
        - { type: number, number: '+442079460102' }   # admin
  variableValues:
    practice_name: Example Willow GP Practice
    practice_mailbox: willow.demo@example.nhs.uk
    opening_hours: Monday to Friday, 08:00 to 18:30 UK local time
    urgent_handover_number: '+442079460101'   # for the prompt text; keep in sync with the tool
    admin_handover_number: '+442079460102'
  • Shared content: the practice context and handover rules are prompt blocks (templates/blocks/nhs-test-{practice,handover}.md, from feat(blocks): shared prompt and config blocks, with a sync command #94). The model and voice are one config block, nhs-test-assistant.yml.
  • Literal transfer numbers: each squad's transfer tool is inline in its tools:append, with literal numbers. The API rejects Liquid in destinations[].number (POST /tool returns 400, even with numberE164CheckEnabled: false), so a shared tool using {{urgent_handover_number}} isn't possible. feat(validate): catch undefined squad variables and Liquid transfer numbers #99 adds a transfer-number-liquid validate error for this. The handover numbers stay in variableValues only so the prompts can say them.
  • Fake numbers: handover numbers come from the Ofcom drama range, so they don't connect. The demo prompts tell the assistant not to transfer, and assistant-to-assistant handoff still works.
  • Missing-variable check: this example shows feat(validate): catch undefined squad variables and Liquid transfer numbers #99's variable-undefined rule. npm run validate -- nhs-test --strict is clean. Removing practice_mailbox from practice-b warns for practice-b's two members only.
  • Live run: this example was pushed to a real org with a file-scoped push. It created 2 assistants, 1 tool and 2 squads, and nothing already in the org changed. GET confirmed both squads use the same two assistant IDs with different values. No call has been placed yet; that is the reviewer's live-call step.

Based on feat/blocks (#94, which now includes #99). No engine code changed.

dhruva-vapi and others added 2 commits November 20, 2026 23:20
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access that start with 'Devin'.

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Devin Review

🟢 Devin Review found nothing to fix · View findings

dhruva-vapi and others added 3 commits November 20, 2026 23:27
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
dhruva-vapi and others added 5 commits November 21, 2026 00:18
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
devin-ai-integration Bot changed the base branch from feat/validate-undefined-variables to feat/blocks November 21, 2026 00:27
@dhruva-vapi
dhruva-vapi merged commit bd98584 into feat/blocks Nov 21, 2026
6 checks passed
devin-ai-integration Bot added a commit that referenced this pull request Nov 21, 2026
* feat(validate): warn on undefined squad variables

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs(examples): add shared NHS practice squads

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(examples): inline practice-specific transfer destinations

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(validate): reject Liquid transfer destination numbers

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs: explain squad variable and transfer number validation

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs: add shared practice quick reference

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs: link NHS example across stacked PR branches

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant