twenty-lead-brief
First step of the lead path. Takes a raw call and produces everything the rest of the path
needs:
twenty-lead-brief → twenty-partner-shortlist → twenty-partner-intro
Four outputs, in order:
- A qualification summary printed in the conversation. You can stop here.
- A partner brief the partner reads to scope and quote.
partner-match-criteria.md, the input to twenty-partner-shortlist.
- An Opportunity in the partners workspace, carrying the brief's URL.
Credentials, the gql() helper and every query live in ../_shared/partner-api.md. Read it
rather than restating anything.
Step 1 — Get the transcript
The user provides it: pasted text, a path (.txt / .vtt / .srt, a meetily folder or
transcripts.json), or a Fireflies link or ID.
- meetily
transcripts.json is { "segments": [ { "text": … } ] }: concatenate text in
order.
.vtt / .srt: drop cue numbers and timecodes.
- Fireflies: fetch the transcript detail (see the shared reference). Needs
FIREFLIES_API_KEY.
No transcript means stop and ask. Never fabricate one, never proceed without one.
For a long transcript, read the whole thing before writing. Coverage is the point.
Step 2 — The qualification summary
A structured extraction against a fixed schema, not a summary. A "summary that loses
nothing" is a contradiction; the schema is what prevents loss, because every dimension has a
slot and a gap is marked rather than silently dropped.
Rules
- Extract ONLY what is in the transcript. If a field isn't covered, write "Not discussed."
A visible gap beats a confident fabrication: it is the signal to ask on the next call.
- Separate stated FACTS from your INFERENCES. Mark any inference "(inferred)". Downstream
matching trusts the facts, so don't contaminate them with guesses.
- Preserve specifics verbatim: numbers, dates, names and roles, tool and CRM names, prices,
budgets, exact requirements. Never round or paraphrase a number. Specifics are where the
matching signal lives.
- Use the customer's own words for needs and objections. Quote pivotal lines.
- Don't smooth over a contradiction or a vagueness: note it. A flagged contradiction is more
useful than a falsely tidy summary.
- With no speaker labels, infer from context who is Twenty and who is the prospect.
Speech-to-text garbles names: flag an uncertain one "(uncertain)" and never invent one.
- Keep PART A tight: it is the one-pager the rest of the path runs on. Push anything not
specific to this deal into PART B. State each fact once.
Output (these exact headers)
== PART A — DEAL ONE-PAGER ==
1. ONE-LINE SUMMARY
2. COMPANY — name, what they do, size/employees, HQ + countries of operation, industry
3. PEOPLE ON THE CALL — name, role/title, side (Twenty vs prospect); infer roles if
unlabeled and flag uncertain names
4. CURRENT SITUATION — what CRM/tools they use today; specific pains
5. WHY THEY'RE INTERESTED IN TWENTY
6. WHAT THEY WANT — bulleted needs/requirements, verbatim where possible
7. IMPLEMENTATION COMPLEXITY (for partner matching)
- Deployment: cloud / self-host / both / unclear (+ the evidence)
- Data model: custom objects, multi-tenant, row-level security, migrations
- Integrations / custom apps needed
- Workflows / automation needs
- Scale: number of seats/users
- Region + language the partner would need to cover
8. COMMERCIALS — budget or prices discussed, plan tier (Pro/Org/Enterprise), seat count,
deal value, who pays
9. TIMELINE & DECISION — key dates, decision-makers, urgency, decision process
10. OBJECTIONS / RISKS / FEARS — including anything that could kill the deal
11. ALTERNATIVES — competitors or other options they're weighing
12. DOES THIS DEAL NEED A PARTNER? — yes / no / maybe + why; and if yes, what kind
(scope, region, language, seniority/tier)
13. NEXT STEPS / OPEN QUESTIONS / FOLLOW-UPS
14. PARTNER-FACING BRIEF — a 2-4 sentence narrative a partner can skim to decide yes/no,
drawn only from PART A
== PART B — APPENDIX (not deal-specific) ==
15. PRODUCT / WEBSITE / GTM FEEDBACK — feedback on the product, pricing page, website
wording, onboarding, or trial; capture even if off-topic for qualification
16. TERMINOLOGY / DOMAIN-LANGUAGE NOTES — words that mean different things to each side or
carry domain-specific meaning (e.g. "partner", "donor", jargon)
17. KEY VERBATIM QUOTES — 3-8 direct quotes that capture intent, needs, or objections
Print it, then save it to the lead folder as YYYY-MM-DD-<lead>-call-summary.md.
Stop here if the user only wanted the summary. Ask before continuing to Step 3: a lead
that is clearly not partner-shaped (section 12 says no) does not need a partner brief.
Step 3 — The partner brief
The doctrine lives in design-doc-doctrine.md in this folder: what to produce, the
structure, the rules, the verification, the self-check. Read it and follow it. The rest of
this section is only the mechanics.
Default output is a zero-inference partner brief. Pass --full for the inference-enabled
design doc. The doctrine defines both.
- Gather — read every source material in full, not just the summary. Convert a
.docx
with textutil -convert txt "<file>" -output /tmp/out.txt on macOS.
- Extract, grounded — facts vs inferences, per the doctrine.
- Draft in the doctrine's section structure.
- Verify load-bearing claims live — WebFetch against the doctrine's doc map before
asserting any capability. Build the References appendix as you go.
- Reconcile discrepancies — sources that disagree (call vs braindump, a name differing
across sources) get flagged both ways, never silently resolved.
- Resolve ❓ with the operator — after a full v1 draft, use AskUserQuestion for the
unknowns a Twenty insider can answer. Leave customer-facing unknowns as ❓. Running
autonomously (a subagent or batch run) means skipping the questions and leaving every
unknown as ❓.
- Run the doctrine's self-check, fix, then save as
YYYY-MM-DD-<lead>-partner-brief.md
(or -design-doc.md in --full).
Step 4 — Publish the brief as a Google Doc
The partner gets a link, never an attachment: a Gmail compose URL cannot carry a file, and a
.md attachment is a poor read.
- Open the shared Drive folder in Chrome:
open -a "Google Chrome" "https://drive.google.com/drive/folders/1ISDCplqLv6GrBQOOX7Fk4OK07LAK8BPd"
Tell the user: create the Doc there, paste the brief markdown, then paste the share URL
back. Mention Tools → Preferences → Enable Markdown once, so the paste renders headings,
bold and tables instead of showing raw ##.
Wait for the URL. If the user skips it, carry on with Step 5 and leave designDocUrl
empty. Say so, because twenty-partner-intro will then have no link to send.
The folder is shared anyone with the link can view, so a partner can open it without an
account. Do not call the Drive API: the connected account is personal, and any Doc it created
would land in the wrong Drive under the wrong owner.
Step 5 — Write partner-match-criteria.md
Always, as a third file in the lead folder. This is the input twenty-partner-shortlist
reads.
- Hard requirements — a
Criterion | Why table. Cover language and region, deployment
type, data-model complexity signal, migration capability, engagement model (fixed vs
retainer).
- Strong preference — bullets: domain familiarity, migration experience, willingness to
scope for free, ability to work with non-technical end-users.
- Nice to have — bullets: industry-specific workflow experience, partner size fit.
- Red flags — bullets: anything that would disqualify a partner silently (language,
hosting model, engagement type, technical depth).
- Budget — what the client said about money, verbatim, or "not stated". Most calls never
state a ceiling, and that is itself the answer.
twenty-partner-shortlist shows this next
to each partner's rate; it never filters on it.
- Matching notes — 3 to 5 bullets: technical nuances, the prospect's sophistication
level, migration unknowns, who the decision-makers are. Draw from Open questions and
Implementation complexity.
Step 6 — Record the Opportunity
This step writes to production. Search before creating, always.
- Search for an existing Opportunity on the company name (see the shared reference). If
one comes back, show it to the user and ask whether to update it or create a new one.
Never create a silent duplicate.
- Resolve the company and the point of contact: search first, create only on a miss.
- Create the Opportunity:
| Field |
Value |
name |
<Company> <need in about three words>, matching existing records: TADA new CRM, Aranya CRM Migration, ECF PRO - Self-hosting multi-workspace |
stage |
NEW |
need |
one line, from section 6 of the summary |
requirements |
the requirements text, from section 7 |
companyId, pointOfContactId |
resolved above |
designDocUrl |
{ "primaryLinkUrl": "<the Doc URL>", "primaryLinkLabel": "Partner brief" }, omitted if Step 4 produced no URL |
Do not set isListed: that belongs to the marketplace pull flow, which this path does
not use. Do not set introSentAt and do not create any Application:
twenty-partner-intro owns both.
- Verify by reading the record back, then print its id and name.
Output files
In the lead folder:
YYYY-MM-DD-<lead>-call-summary.md
YYYY-MM-DD-<lead>-partner-brief.md (or -design-doc.md in --full)
partner-match-criteria.md
Notes
- Keep
partner-match-criteria.md current as you learn more about the lead. It feeds
twenty-partner-shortlist and, eventually, in-product matching logic.
- Sections 7 and 12 of the summary are the matching axes:
Deployment → deploymentExpertise,
scope needs → partnerScope, region and language → partner region and languages, scale →
capacity, the "needs a partner?" tier → partnerTier.
- Worked example:
partners-experience/TSF/2026-05-26-tsf-design-doc.md shows the target
coverage, flag discipline and verification appendix. It predates the current concision and
formatting rules, so follow the doctrine over the example where they differ.
1---2name: twenty-lead-brief3description: Turn a Twenty sales/discovery call into a partner-ready brief and record the lead in the CRM. Use whenever the user has a call recording, transcript, Fireflies link, or a lead folder and wants to qualify the deal, summarize the call, write a partner brief, or prep the partner handoff. Trigger even without the word "brief" - "summarize this call", "what did we learn from the X call", "qualify this lead", "scope this for a partner", "draft a design doc", or pointing at a transcript file all count. Produces a qualification summary, a partner brief, matching criteria, and an Opportunity in the partners workspace. Pass --full for inference mode.4---56# twenty-lead-brief78First step of the lead path. Takes a raw call and produces everything the rest of the path9needs:1011```12twenty-lead-brief → twenty-partner-shortlist → twenty-partner-intro13```1415Four outputs, in order:16171. A **qualification summary** printed in the conversation. You can stop here.182. A **partner brief** the partner reads to scope and quote.193. **`partner-match-criteria.md`**, the input to `twenty-partner-shortlist`.204. An **Opportunity** in the partners workspace, carrying the brief's URL.2122Credentials, the `gql()` helper and every query live in `../_shared/partner-api.md`. Read it23rather than restating anything.2425---2627## Step 1 — Get the transcript2829The user provides it: pasted text, a path (`.txt` / `.vtt` / `.srt`, a meetily folder or30`transcripts.json`), or a Fireflies link or ID.3132- meetily `transcripts.json` is `{ "segments": [ { "text": … } ] }`: concatenate `text` in33 order.34- `.vtt` / `.srt`: drop cue numbers and timecodes.35- Fireflies: fetch the transcript detail (see the shared reference). Needs `FIREFLIES_API_KEY`.3637**No transcript means stop and ask.** Never fabricate one, never proceed without one.3839For a long transcript, read the whole thing before writing. Coverage is the point.4041---4243## Step 2 — The qualification summary4445A **structured extraction against a fixed schema**, not a summary. A "summary that loses46nothing" is a contradiction; the schema is what prevents loss, because every dimension has a47slot and a gap is marked rather than silently dropped.4849**Rules**5051- Extract ONLY what is in the transcript. If a field isn't covered, write "Not discussed."52 A visible gap beats a confident fabrication: it is the signal to ask on the next call.53- Separate stated FACTS from your INFERENCES. Mark any inference "(inferred)". Downstream54 matching trusts the facts, so don't contaminate them with guesses.55- Preserve specifics verbatim: numbers, dates, names and roles, tool and CRM names, prices,56 budgets, exact requirements. Never round or paraphrase a number. Specifics are where the57 matching signal lives.58- Use the customer's own words for needs and objections. Quote pivotal lines.59- Don't smooth over a contradiction or a vagueness: note it. A flagged contradiction is more60 useful than a falsely tidy summary.61- With no speaker labels, infer from context who is Twenty and who is the prospect.62 Speech-to-text garbles names: flag an uncertain one "(uncertain)" and never invent one.63- Keep PART A tight: it is the one-pager the rest of the path runs on. Push anything not64 specific to this deal into PART B. State each fact once.6566**Output (these exact headers)**6768```69== PART A — DEAL ONE-PAGER ==70711. ONE-LINE SUMMARY722. COMPANY — name, what they do, size/employees, HQ + countries of operation, industry733. PEOPLE ON THE CALL — name, role/title, side (Twenty vs prospect); infer roles if74 unlabeled and flag uncertain names754. CURRENT SITUATION — what CRM/tools they use today; specific pains765. WHY THEY'RE INTERESTED IN TWENTY776. WHAT THEY WANT — bulleted needs/requirements, verbatim where possible787. IMPLEMENTATION COMPLEXITY (for partner matching)79 - Deployment: cloud / self-host / both / unclear (+ the evidence)80 - Data model: custom objects, multi-tenant, row-level security, migrations81 - Integrations / custom apps needed82 - Workflows / automation needs83 - Scale: number of seats/users84 - Region + language the partner would need to cover858. COMMERCIALS — budget or prices discussed, plan tier (Pro/Org/Enterprise), seat count,86 deal value, who pays879. TIMELINE & DECISION — key dates, decision-makers, urgency, decision process8810. OBJECTIONS / RISKS / FEARS — including anything that could kill the deal8911. ALTERNATIVES — competitors or other options they're weighing9012. DOES THIS DEAL NEED A PARTNER? — yes / no / maybe + why; and if yes, what kind91 (scope, region, language, seniority/tier)9213. NEXT STEPS / OPEN QUESTIONS / FOLLOW-UPS9314. PARTNER-FACING BRIEF — a 2-4 sentence narrative a partner can skim to decide yes/no,94 drawn only from PART A9596== PART B — APPENDIX (not deal-specific) ==979815. PRODUCT / WEBSITE / GTM FEEDBACK — feedback on the product, pricing page, website99 wording, onboarding, or trial; capture even if off-topic for qualification10016. TERMINOLOGY / DOMAIN-LANGUAGE NOTES — words that mean different things to each side or101 carry domain-specific meaning (e.g. "partner", "donor", jargon)10217. KEY VERBATIM QUOTES — 3-8 direct quotes that capture intent, needs, or objections103```104105Print it, then save it to the lead folder as `YYYY-MM-DD-<lead>-call-summary.md`.106107**Stop here if the user only wanted the summary.** Ask before continuing to Step 3: a lead108that is clearly not partner-shaped (section 12 says no) does not need a partner brief.109110---111112## Step 3 — The partner brief113114**The doctrine lives in `design-doc-doctrine.md` in this folder: what to produce, the115structure, the rules, the verification, the self-check. Read it and follow it.** The rest of116this section is only the mechanics.117118Default output is a **zero-inference partner brief**. Pass `--full` for the inference-enabled119design doc. The doctrine defines both.1201211. **Gather** — read every source material in full, not just the summary. Convert a `.docx`122 with `textutil -convert txt "<file>" -output /tmp/out.txt` on macOS.1232. **Extract, grounded** — facts vs inferences, per the doctrine.1243. **Draft** in the doctrine's section structure.1254. **Verify load-bearing claims live** — WebFetch against the doctrine's doc map before126 asserting any capability. Build the References appendix as you go.1275. **Reconcile discrepancies** — sources that disagree (call vs braindump, a name differing128 across sources) get flagged both ways, never silently resolved.1296. **Resolve ❓ with the operator** — after a full v1 draft, use AskUserQuestion for the130 unknowns a Twenty insider can answer. Leave customer-facing unknowns as ❓. **Running131 autonomously** (a subagent or batch run) means skipping the questions and leaving every132 unknown as ❓.1337. **Run the doctrine's self-check**, fix, then save as `YYYY-MM-DD-<lead>-partner-brief.md`134 (or `-design-doc.md` in `--full`).135136---137138## Step 4 — Publish the brief as a Google Doc139140The partner gets a link, never an attachment: a Gmail compose URL cannot carry a file, and a141`.md` attachment is a poor read.1421431. Open the shared Drive folder in Chrome:144145```bash146open -a "Google Chrome" "https://drive.google.com/drive/folders/1ISDCplqLv6GrBQOOX7Fk4OK07LAK8BPd"147```1481492. Tell the user: create the Doc there, paste the brief markdown, then paste the share URL150 back. Mention `Tools → Preferences → Enable Markdown` once, so the paste renders headings,151 bold and tables instead of showing raw `##`.1521533. **Wait for the URL.** If the user skips it, carry on with Step 5 and leave `designDocUrl`154 empty. Say so, because `twenty-partner-intro` will then have no link to send.155156The folder is shared `anyone with the link can view`, so a partner can open it without an157account. Do not call the Drive API: the connected account is personal, and any Doc it created158would land in the wrong Drive under the wrong owner.159160---161162## Step 5 — Write `partner-match-criteria.md`163164Always, as a third file in the lead folder. This is the input `twenty-partner-shortlist`165reads.166167- **Hard requirements** — a `Criterion | Why` table. Cover language and region, deployment168 type, data-model complexity signal, migration capability, engagement model (fixed vs169 retainer).170- **Strong preference** — bullets: domain familiarity, migration experience, willingness to171 scope for free, ability to work with non-technical end-users.172- **Nice to have** — bullets: industry-specific workflow experience, partner size fit.173- **Red flags** — bullets: anything that would disqualify a partner silently (language,174 hosting model, engagement type, technical depth).175- **Budget** — what the client said about money, verbatim, or "not stated". Most calls never176 state a ceiling, and that is itself the answer. `twenty-partner-shortlist` shows this next177 to each partner's rate; it never filters on it.178- **Matching notes** — 3 to 5 bullets: technical nuances, the prospect's sophistication179 level, migration unknowns, who the decision-makers are. Draw from Open questions and180 Implementation complexity.181182---183184## Step 6 — Record the Opportunity185186**This step writes to production.** Search before creating, always.1871881. **Search** for an existing Opportunity on the company name (see the shared reference). If189 one comes back, show it to the user and ask whether to update it or create a new one.190 Never create a silent duplicate.1912. **Resolve the company and the point of contact**: search first, create only on a miss.1923. **Create** the Opportunity:193194| Field | Value |195|---|---|196| `name` | `<Company> <need in about three words>`, matching existing records: `TADA new CRM`, `Aranya CRM Migration`, `ECF PRO - Self-hosting multi-workspace` |197| `stage` | `NEW` |198| `need` | one line, from section 6 of the summary |199| `requirements` | the requirements text, from section 7 |200| `companyId`, `pointOfContactId` | resolved above |201| `designDocUrl` | `{ "primaryLinkUrl": "<the Doc URL>", "primaryLinkLabel": "Partner brief" }`, omitted if Step 4 produced no URL |202203Do **not** set `isListed`: that belongs to the marketplace pull flow, which this path does204not use. Do **not** set `introSentAt` and do not create any Application:205`twenty-partner-intro` owns both.2062074. **Verify** by reading the record back, then print its id and name.208209---210211## Output files212213In the lead folder:214215- `YYYY-MM-DD-<lead>-call-summary.md`216- `YYYY-MM-DD-<lead>-partner-brief.md` (or `-design-doc.md` in `--full`)217- `partner-match-criteria.md`218219---220221## Notes222223- Keep `partner-match-criteria.md` current as you learn more about the lead. It feeds224 `twenty-partner-shortlist` and, eventually, in-product matching logic.225- Sections 7 and 12 of the summary are the matching axes: `Deployment → deploymentExpertise`,226 scope needs → `partnerScope`, region and language → partner region and languages, scale →227 capacity, the "needs a partner?" tier → `partnerTier`.228- Worked example: `partners-experience/TSF/2026-05-26-tsf-design-doc.md` shows the target229 coverage, flag discipline and verification appendix. It predates the current concision and230 formatting rules, so **follow the doctrine over the example** where they differ.