# Enquiry guide: themes, discovery stages and question trees

This guide explains the *reasoning* behind TriLabz's discovery conversation. The exact question IDs, answer options and conditions are defined in [enquiry-schema.json](enquiry-schema.json), the single source of truth for logic. Question IDs below are given in backticks (for example `cs.build`) and resolve to entries in that file. Tone and behaviour rules are in [conversation-guide.md](conversation-guide.md).

The ten themes mirror the categories on the TriLabz website's enquiry form (https://www.trilabz.com/contact/), so the brief an assistant produces lines up with what the team normally receives.

## The common discovery stages

Not every conversation uses every stage. A general enquiry may need two or three questions.

| # | Stage | Purpose | Notes |
|---|---|---|---|
| 1 | `need` Understand the need | What prompted it, what to achieve, what success looks like | Always business-first |
| 2 | `context` Understand the context | New or existing, who is affected, current process, pain | |
| 3 | `requirements` Explore requirements | What it should do, integrations, constraints | |
| 4 | `technical` Technical discovery | Architecture, stack, hosting, data, security, scale | Only when relevant and comfortable; "I don't know" is fine |
| 5 | `readiness` Project readiness | Stage, timeframe, stakeholders | All optional |
| 6 | `contact` Contact details | Name, work email, organisation, job title, country, preferred contact method | Only what is relevant; phone only if "Phone call" is chosen |
| 7 | `review` Review and refine | Summarise, flag gaps, separate confirmed from assumed, allow edits | Always |

## Choosing a theme

1. Read the opening message and look for the closest theme using the examples below.
2. Suggest, don't impose: "This sounds like X. Does that fit?"
3. When several apply (for example legacy modernisation plus cloud plus AI), keep one *primary* theme and note the others as related. Ask the primary theme's entry question and at most one or two key questions from each secondary theme.
4. When nothing fits, or the person says they are not sure, use Ideas & Exploration, or General Enquiries for a simple question.

Quick routing hints (fuzzy, use judgement):

| Signals in the message | Likely theme |
|---|---|
| build, app, portal, platform, API, SaaS, mobile, Alfresco, search | Custom Software Development |
| AI, chatbot, agent, RAG, automate with AI, our documents | AI & Agentic Solutions |
| old, legacy, outdated, upgrade, migrate, mainframe, on-premise to cloud | Legacy System Modernisation |
| AWS, cloud, deployment, CI/CD, Kubernetes, infrastructure | Cloud & Platform Engineering |
| slow, load test, scale, timeout, regression, test automation | Performance Engineering |
| review our architecture, which technology, advice, strategy | Technical Consulting |
| partner, collaborate, reseller, subcontract | Business & Technology Partnerships |
| job, hiring, intern, join | Careers & Opportunities |
| idea, not sure what we need, what's possible | Ideas & Exploration |
| question, call me, general | General Enquiries |

## Global branching rules

These apply in every theme and are encoded as `onAnswer` rules or engine settings in the schema.

- **Existing system selected** → ask about the current system and its challenges (`cs.existing_system`, `lm.purpose`, `pe.system`).
- **New project selected** → ask about objectives and intended users (`sh.users`, `sh.success`) and skip existing-system questions.
- **Integration mentioned or "Yes"** → ask which systems and what flows between them (`sh.integrations_detail`).
- **AI use case mentioned** → ask about data and intended outcomes before anything technical.
- **User doesn't know technical details** → record unknown and continue with business questions.
- **No timeline** → accept and continue; omit from brief. Budget is never asked.
- **User changes theme** → keep compatible answers (see `engine.themeSwitch.carryOver`).
- **Multiple services relevant** → recognise the overlap; do not run two full trees.
- **Answered in the opening message** → mark as inferred; do not ask again; confirm at review.

## Reusable questions

Shared across themes: `sh.users`, `sh.success`, `sh.existing_systems`, `sh.integrations` / `sh.integrations_detail`, `sh.constraints`, `sh.stage`, `sh.timeline`, `sh.anything_else`, and the contact set `ct.name`, `ct.email`, `ct.org`, `ct.title`, `ct.country`, `ct.method`, `ct.phone`.

---

## Theme 1: Custom Software Development

- **ID:** `custom-software` · **Services:** custom software; mobile; ECM; search & data
- **For:** teams or founders building a new product, extending an existing application, or building backend, mobile, content or search platforms.
- **Typical situations:** a new customer portal; an internal tool replacing spreadsheets; an API layer; an Alfresco-based content platform; enterprise search.
- **Example messages:** "We need a customer portal built for our members." · "I want a mobile app for my delivery business."
- **Entry question:** `cs.build` "What are you looking to build?"
- **Sequence:** `cs.build` → `cs.problem` → `cs.project_type` → `sh.users` → (`cs.existing_system`) → `cs.features` → `sh.integrations` → (`sh.integrations_detail`) → `cs.platforms` → `cs.accessibility` → `sh.success` → `sh.constraints` → readiness → contact → review.
- **Branches:** project type "Existing application" or "Extension or enhancement" opens `cs.existing_system`; "New project" skips it. Integrations "Yes" opens `sh.integrations_detail`. `cs.platforms` is hidden for API/backend and search builds. "Not sure yet" at `cs.build` suggests Ideas & Exploration.
- **Complete when:** `cs.build` answered; best results with `cs.problem`, `sh.users`, `cs.features`, `sh.success`.
- **Brief emphasis:** problem statement, target users, functional requirements, integrations, platforms.

## Theme 2: AI & Agentic Solutions

- **ID:** `ai-agentic` · **Service:** AI integration and agentic tooling
- **For:** organisations that want AI to work with their documents, data and systems, or to automate or assist a process.
- **Typical situations:** assistant over internal documents; automating a repetitive workflow; giving AI agents safe access to content or search; adding AI to a product.
- **Example messages:** "I have an idea for an AI-powered platform, but I'm not sure how to approach it." · "Can we use AI on our policy documents?"
- **Entry question:** `ai.goal` "What would you like to achieve using AI?" with options: improve an existing business process; create a new AI-powered product; automate workflows; build an intelligent assistant; work with internal knowledge or documents; explore without a defined solution.
- **Sequence:** `ai.goal` → `ai.problem` → `sh.users` → `ai.data_sources` → (`ai.data_detail` → `ai.sensitivity`) → `sh.existing_systems` → `ai.autonomy` → (`sh.integrations`…) → `sh.success` → `ai.constraints` → readiness → contact → review.
- **Branches:** "internal knowledge or documents" jumps to `ai.data_sources`; data "Yes" opens `ai.data_detail` and `ai.sensitivity`, data "No/Not sure" skips both; "explore" or "Not sure yet" suggests blending with Ideas & Exploration; `ai.autonomy` asks how much human involvement is wanted and leads into integrations when actions in other systems are expected.
- **Explicitly avoided:** asking which LLM, vector database or agent framework the user wants. Those are solution-design decisions.
- **Complete when:** `ai.goal` answered; best with `ai.problem`, `sh.users`, `ai.data_sources`, `sh.success`.
- **Brief emphasis:** business problem, users, data sources and sensitivity, automation level and human involvement, integrations.

## Theme 3: Legacy System Modernisation

- **ID:** `legacy-modernisation` · **Service:** legacy system modernisation and migration
- **For:** organisations running ageing or hard-to-change systems.
- **Typical situations:** on-premise application moving to cloud; platform or database upgrade on a live system; monolith to microservices; search platform migration.
- **Example messages:** "Our core application is 15 years old and nobody wants to touch it."
- **Entry question:** `lm.what` "What would you like to modernise?"
- **Sequence:** `lm.what` → `lm.purpose` → `lm.limitations` → `lm.in_production` → `lm.stack` → `lm.access` → `sh.integrations` → `lm.continuity` → `lm.target` → `sh.success` → `sh.constraints` → readiness → contact → review.
- **Branches:** "Slow or unreliable" flags a possible secondary Performance theme; "Difficult to integrate" opens integrations; not in production skips `lm.continuity`; target "Move it to the cloud" suggests Cloud & Platform Engineering as secondary; target "advice on the best path" suggests Technical Consulting as secondary.
- **Stack unknown?** Fine. `lm.stack` and `lm.access` are optional and "Not sure" is expected from non-technical owners.
- **Complete when:** `lm.what`; best with `lm.purpose`, `lm.limitations`, `lm.continuity`, `lm.target`.
- **Brief emphasis:** system purpose and criticality, limitations, continuity needs, migration expectations, source availability.

## Theme 4: Cloud & Platform Engineering

- **ID:** `cloud-platform` · **Services:** cloud and backend architecture; DevOps and production support
- **For:** teams planning a cloud architecture or migration, or needing better CI/CD, deployment, monitoring and reliability.
- **Typical situations:** moving to AWS; serverless or microservice design; manual deployments; cloud cost; incident response.
- **Entry question:** `cp.help` "What do you need help with?"
- **Sequence:** `cp.help` → `cp.environment` → `cp.pain` → `cp.provider` → (`cp.migration_scope`) → (`cp.cicd`) → `cp.priorities` → `sh.existing_systems` → `sh.success` → `sh.constraints` → readiness → contact → review.
- **Branches:** "Cloud migration" opens `cp.migration_scope`; `cp.cicd` appears for infrastructure, DevOps, deployment and unsure needs. Provider Azure, Google Cloud or Other: say TriLabz's cloud work is on AWS and does not cover them; record the user's preference as stated.
- **Complete when:** `cp.help`; best with `cp.environment`, `cp.pain`, `cp.priorities`.

## Theme 5: Performance Engineering

- **ID:** `performance` · **Service:** quality engineering and test automation (see the note about performance in [services.md](services.md))
- **For:** teams with slow or unreliable systems, or who need confidence a system will handle expected load.
- **Entry question:** `pe.looking` "What are you looking for?"
- **Sequence:** `pe.looking` → `pe.system` → (`pe.symptoms` → `pe.when`) → `pe.volume` → `pe.monitoring` → (`pe.qe_scope`) → `pe.target` → `sh.existing_systems` → `sh.constraints` → readiness → contact → review.
- **Branches:** symptom questions appear for optimisation, troubleshooting and "Other"; for performance, load or scalability testing, ask about volumes and targets directly; "Test automation and quality engineering" opens `pe.qe_scope`.
- **Complete when:** `pe.looking`; best with `pe.system`, `pe.symptoms`, `pe.target`.

## Theme 6: Technical Consulting

- **ID:** `consulting` · **Services:** none dedicated (architect-led guidance; confirm commercial scope with the team)
- **For:** leaders who need an experienced view before committing.
- **Entry question:** `tc.guidance` "What kind of guidance do you need?"
- **Sequence:** `tc.guidance` → `tc.challenge` → (`tc.existing_arch`) → (`tc.options`) → `tc.deliverable` → `tc.stakeholders` → `sh.constraints` → `sh.timeline` → contact → review.
- **Branches:** "Technology selection" opens `tc.options`; architecture, assessment, strategy and selection open `tc.existing_arch`.
- **Complete when:** `tc.guidance`; best with `tc.challenge`, `tc.deliverable`.

## Theme 7: Business & Technology Partnerships

- **ID:** `partnerships` · **Services:** none
- **For:** organisations exploring a collaboration.
- **Entry question:** `bp.collab` "What type of collaboration are you exploring?"
- **Sequence:** `bp.collab` → `bp.organisation` (the website requires an organisation name here) → `bp.objectives` → `bp.shape` → `sh.timeline` → contact → review. No project-context questions (stage, budget).
- **Do not describe** any partner programme, tiers or terms: none are published.

## Theme 8: Careers & Opportunities

- **ID:** `careers` · **Services:** none
- **For:** engineers and students interested in working with TriLabz.
- **Entry question:** `ca.interest` "What are you interested in?"
- **Sequence:** `ca.interest` → `ca.background` → `ca.linkedin` → `ca.portfolio` → contact → review.
- **Branches:** "Business or strategic collaboration" suggests the Partnerships theme.
- **Do not state** open roles, hiring process or salary: none are published. CVs are not uploaded via the website; share a link or email hello@trilabz.com.

## Theme 9: Ideas & Exploration

- **ID:** `ideas` · **Services:** none dedicated; leads to the relevant specific theme.
- **For:** people with an idea, business challenge or opportunity but no known solution. No technical knowledge expected.
- **Website intro to echo:** "Have an idea or challenge in mind? Let's explore it together. No technical knowledge needed."
- **Entry question:** `id.situation` "What best describes your situation?"
- **Sequence:** `id.situation` → `id.trigger` → `id.goal` → `sh.users` → `id.similar` → (`id.similar_detail`) → `id.help` → `id.stage` → `sh.timeline` → contact → review.
- **Branches:** "exploring AI opportunities" suggests blending with AI & Agentic Solutions; "improve an existing process or system" skips `id.similar`; similar exists "Yes" opens `id.similar_detail`.
- **Upgrade path:** as soon as the idea is clear enough, name the matching specific theme and carry answers across.
- **Brief emphasis:** what prompted it, the problem or opportunity, hoped-for outcome, who benefits, help wanted.

## Theme 10: General Enquiries

- **ID:** `general` · **Services:** none
- **For:** simple questions or people who prefer not to categorise.
- **Entry question:** `ge.subject` "What is your enquiry about?"
- **Sequence:** `ge.subject` → `ge.details` → contact (`ct.name`, `ct.email`, `ct.method`). Three questions at most before contact.
- **Rule:** never add project-discovery questions. If the message reveals a real project, suggest switching theme.

---

## Conditional logic reference

Conditions are objects such as `{"equals": {"q": "cs.project_type", "value": "New project"}}`, combinable with `all`, `any` and `not`. Rules after an answer (`onAnswer`) can `goTo` a question, `skip` questions, or `suggestTheme`. The engine rules, including answer preservation and the "no repeat" policy, are in the schema's `engine` section.

## Reviewing completeness

Per theme, `completion.minimum` is the least that makes a useful brief; `recommended` are the questions that most improve it; `contactNeededOnlyToSend` lists what the user must supply only when they submit through the website. Never block the review on optional questions. See [project-brief.md](project-brief.md).
