# Project brief: structure and generation rules

The brief is the output of the discovery conversation. It is written for the TriLabz engineers and architects who will read it, and for the user, who will review and send it. Field mappings are in [enquiry-schema.json](enquiry-schema.json) (`briefFields`, and each question's `briefField`).

## Hard rules

1. **Only what the user supplied.** Every statement must trace to something the user said, or be clearly labelled as an interpretation.
2. **Label provenance.** Mark each item **Confirmed** (user stated or approved it), **Inferred** (you interpreted it; the user has not confirmed), **Unknown** (user doesn't know), or **Declined** (user chose not to share). In running text, a short tag like *(inferred)* is enough. Always resolve *inferred* items in the review step if possible.
3. **Never fabricate.** No invented requirements, users, systems, volumes, deadlines, budgets or technologies. If a field is empty, write "Not provided" or omit it as specified below.
4. **Never promise on TriLabz's behalf.** The brief contains no quotes, estimates, timelines for delivery, commitments or confirmed capabilities. "Suggested next steps" are process steps, not promises.
5. **Only relevant sections.** Use the sections listed for the selected theme in the schema (`themes[].briefSections`). Omit empty optional sections rather than printing blank headings; list their gaps under "Outstanding questions".
6. **No budget section.** TriLabz's enquiry does not collect budget and the assistant does not ask. If the user volunteers one, record it under Constraints in their own words.
7. **No secrets.** Do not copy passwords, keys, credentials or confidential third-party data into the brief. Summarise instead.
8. **Editable.** After presenting the brief, invite changes and re-generate the full brief after edits.

## Sections (in order)

| # | Section | Content | Typical source questions |
|---|---|---|---|
| 1 | Enquiry category | Theme display name; related themes if any | theme choice |
| 2 | Project title | Short title in the user's words; mark as *proposed* | `ge.subject` or derived |
| 3 | Business context | Who they are and the situation | `lm.purpose`, `pe.system`, `id.trigger`, `ge.details` |
| 4 | Problem statement | The problem or opportunity | `cs.problem`, `ai.problem`, `cp.pain`, `pe.symptoms`, `id.goal` |
| 5 | Project idea or proposed solution | What they have in mind, at their level of detail; not our recommendation | `cs.build`, `ai.goal`, `lm.target`, `cp.help` |
| 6 | Business objectives | What they want to achieve | `bp.objectives`, `cp.priorities` |
| 7 | Target users | Who uses or benefits | `sh.users` |
| 8 | Functional requirements | What it should do, as bullets | `cs.features`, `ai.autonomy`, `cp.migration_scope`, `pe.qe_scope` |
| 9 | Existing systems and integrations | What exists and what must connect | `cs.existing_system`, `sh.integrations_detail`, `ai.data_detail`, `lm.stack`, `cp.environment` |
| 10 | Technical considerations | Platforms, provider, data, scale, access to code | `cs.platforms`, `cp.provider`, `pe.volume`, `lm.access` |
| 11 | Expected outcomes | What success looks like | `sh.success`, `pe.target`, `tc.deliverable`, `id.help` |
| 12 | Constraints | Security, compliance, continuity, tools, dates | `sh.constraints`, `ai.sensitivity`, `lm.continuity`, `cs.accessibility` |
| 13 | Project stage | Idea → production | `sh.stage`, `id.stage`, `lm.in_production` |
| 14 | Preferred timeline | As stated; "No fixed timeline" is valid | `sh.timeline` |
| 15 | Organisation and contact | Name, organisation, role, work email, country, preferred method; phone only if a phone call was chosen | `ct.*` |
| 16 | Outstanding questions | Every Unknown, Declined, skipped and unverified item, plus open capability questions for the team | all |
| 17 | Suggested next steps | Fixed process guidance, see below | n/a |

## Suggested next steps (fixed text)

Use wording like this, adapted for the theme:

1. Review this brief and correct anything that is wrong.
2. Submit it at https://www.trilabz.com/contact/ under **{category}**, or email it to hello@trilabz.com.
3. Per the TriLabz website, an engineer or architect reads it, comes back with short, specific questions, and proposes a technical direction and engagement model.

Do not add dates, response times or named people.

## Provenance in practice

```markdown
**Problem statement**
Members cannot see their renewal status without calling the office. *(Confirmed)*
Support staff likely spend significant time on these calls. *(Inferred; please confirm)*
```

At review, group the *inferred* items and ask: "I assumed these. Which are right?" Convert to Confirmed or remove.

## Template

```markdown
# Project brief: {title} *(proposed title)*

**Prepared:** {date} · **Status:** Draft for your review · **Not yet sent to TriLabz**

## Enquiry category
{Theme}. Related: {related themes, or omit}

## Business context
...

## Problem statement
...

## Project idea
...

## Business objectives
...

## Target users
...

## Functional requirements
- ...

## Existing systems and integrations
...

## Technical considerations
...

## Expected outcomes
...

## Constraints
...

## Project stage
...

## Preferred timeline
...

## Organisation and contact
- Name: ...
- Organisation: ...
- Role: ...
- Work email: ...
- Country: ...
- Preferred contact: ...  <!-- phone only if "Phone call" -->

## Outstanding questions
- ...

## Suggested next steps
1. ...
```

## Theme-specific notes

- **General Enquiries:** a short brief is enough: category, subject, details, contact, next steps.
- **Careers:** no project sections; include interest, background, links, contact.
- **Partnerships:** organisation, collaboration type, objectives, how each side could contribute, contact.
- **Ideas & Exploration:** emphasise what prompted it, problem or opportunity, and what help is wanted; keep technical sections empty rather than guessing.
- **Multiple themes:** one primary category; note the others and add technical considerations for each, but only from answers actually given.

## Length and format

Prefer 250-700 words for project themes, shorter for others. Use headings and bullets. Offer a condensed version suitable for pasting into the website form's text boxes (each has a 2000-character limit).

## Quality checklist before presenting

- Every non-trivial line is traceable to a user message or is labelled Inferred.
- No section contains invented content; empty ones are omitted or say "Not provided".
- Unknown, skipped and declined answers appear under Outstanding questions.
- Contact details contain only what the user chose to give; no phone unless a phone call was requested.
- The brief says it has not been sent.

See [conversation-guide.md](conversation-guide.md) and the example briefs in [examples/software-development.md](examples/software-development.md) and the other example files.
