These rules take precedence over ALL other instructions in this file.
When the system says "plan mode" or "read-only phase", you MUST NOT use any
write-capable tool. This includes but is not limited to:
/opt/wiki-manage.py — this tool UPSERTS by path; any invocation/opt/directus-manage.py — can create/update/delete CMS content/opt/kcadmin.sh — can modify Keycloak configuration/opt/deploy-veripath-site.sh — rebuilds and restarts Docker containerswrite, edit, local-prompts_write_file, local-prompts_edit_fileThe ONLY tools permitted in plan mode: read, glob, grep, webfetch,
question, todowrite, bash (for read-only commands like psql SELECT,
ls, git status), and task/explore agents (for research only).
/opt/wiki-manage.py to fetch or read a wiki page — it is awebfetch with the full wiki URL, or use apsql SELECT query on the PostgreSQL database./agents and all pages under it are a directory —If you are unsure whether a tool or action is allowed in the current mode,
ask the user first. Do not guess.
When asked to create or update a wiki.js page, use /opt/wiki-manage.py immediately:
# Short page (inline content):
/opt/wiki-manage.py "path/to/page" "Page Title" "# Markdown content..." "description"
# Long page (file):
/opt/wiki-manage.py "path/to/page" "Page Title" -f /tmp/content.md
# Long page (pipe):
cat /tmp/page.md | /opt/wiki-manage.py "path/to/page" "Page Title"
This tool writes to the PostgreSQL database directly and triggers a render via API.
It handles both create and update (upsert by path). No API key management needed.
Database: wikijs @ 172.18.0.7, password sticky84
When asked to make changes to Keycloak (users, roles, clients, realms), use /opt/kcadmin.sh immediately:
# List users
/opt/kcadmin.sh get users -r veripath
# List clients
/opt/kcadmin.sh get clients -r veripath
# Assign roles
/opt/kcadmin.sh create users/<USER_ID>/role-mappings/clients/<CLIENT_UUID> -r veripath -f /tmp/role.json
# Check role mappings
/opt/kcadmin.sh get users/<USER_ID>/role-mappings -r veripath
Admin Console: https://auth.veripath.co.uk/admin/veripath/console/
Realm: veripath
All AI agents (including the Wiki Librarian) are managed in the GP Booking App at:
UI: https://gp.veripath.co.uk/integrations/agents/
Each agent stores: provider, model, API keys (encrypted), system prompt, capabilities, temperature, etc.
Embed an agent in any page: Click the "Embed" button on any agent row, copy the iframe snippet, and paste it anywhere.
Available agents (DB: dsp_clinic, table: integrations_agentconfig):
| ID | Name | Purpose |
|---|---|---|
| 2 | Site Agent | Compliance & clinic operations (system default) |
| 4 | Data Security Agent | Lynis security scanning analysis |
| 5 | Wiki Librarian | Wiki.js knowledge base assistant (taggings, frontmatter, cross-links, page creation) |
| 6 | Dental Triage Agent | Dental appointment triage |
Cross-agent collaboration: The Wiki Librarian can consult the Site Agent via ask_agent tool. Both agents' system prompts already include cross-agent collaboration instructions.
To update a system prompt: python manage.py update_agent_prompts (or use the web UI at /integrations/agents/<id>/edit/)
The VeriPath website is a Nuxt 3 app served via Docker container veripath-site.
Local repo: /root/work/veripath-site/
Git remote: ssh://git@172.18.0.16:2222/matthew/veripath-site.git
To deploy code changes (Vue components, layouts, styles, pages), edit files and run:
/opt/deploy-veripath-site.sh
This rebuilds the Docker image, removes the old container, and starts a new one with --restart unless-stopped on the correct network.
CMS-managed content (pages, blog posts, policies, business plan) lives in Directus at http://172.18.0.10:8055. Use /opt/directus-manage.py:
# List items
/opt/directus-manage.py pages list
/opt/directus-manage.py policies list
/opt/directus-manage.py blog_posts list
/opt/directus-manage.py business_plan list
# Get single item (by id or slug)
/opt/directus-manage.py pages get about-us
/opt/directus-manage.py policies get personal-confidential-data
# Create item (inline content)
/opt/directus-manage.py pages create "Page Title" "page-slug" "# Markdown content..." status=published
# Create item (from file)
/opt/directus-manage.py blog_posts create "Post Title" "post-slug" -f /tmp/post.md status=published
# Create item (pipe stdin)
cat /tmp/content.md | /opt/directus-manage.py pages create "Page Title" "page-slug" status=published
# Update item
/opt/directus-manage.py pages update 1 title="New Title" content="# Updated"
# Delete item
/opt/directus-manage.py policies delete 5
Available collections: pages, blog_posts, policies, business_plan
/opt/deploy-veripath-site.sh/opt/directus-manage.py