---
name: consult-project-specialist
description: >-
  Turn a single sales / consulting meeting into tracked work. Give it a meeting
  transcript or notes — pasted text, a Google Doc, or a Gemini Notes link — and
  it produces a structured Weekly Project Update, then lays down the three things
  the engagement needs: a numbered Google Drive project folder, a kickoff/context
  Doc inside it, and a CRM deal in Supabase with a meeting + links-note + one task
  per "What's Next" item. Trigger on /consult-project-specialist or when Peter says
  "turn this meeting into a project", "建立顧問專案", "把這次會議建成 deal",
  "log this engagement into the CRM", "document this consult", "建專案資料夾 +
  CRM", or hands over a meeting transcript / Gemini Notes about a sales or
  consulting engagement and wants it tracked end-to-end. This is the
  document-one-engagement skill — distinct from project-note-specialist (which
  ONLY tidies notes into a Weekly Update and writes NO folder or CRM record) and
  from consult-intake (which sweeps the week's inbound website consult EMAILS in
  batch). When Peter has ONE meeting/debrief he wants captured as a project +
  deal, prefer this skill.
category: sales-consultant
project: consult-project-specialist
platform: claude
status: Done
author: Peter Tu
sheetId: "2.05"
input: "A meeting transcript / notes (pasted text, a Google Doc, or a Gemini Notes link), optionally a CRM company/contact reference (a zynkr-crm URL or names/emails)."
process: "Read input → write a Weekly Project Update → create a numbered Drive project folder + kickoff doc → create a NEW Supabase CRM deal with meeting/note/task activities → backlink + report."
output: "A Weekly Project Update, a numbered Drive project folder, a kickoff/context Doc, and a CRM deal with its activity timeline."
synergy: []
---

# Sales Project Specialist

```bash
npx skills add https://github.com/peter-tu-zynkr/zynkr-skill-builder --skill consult-project-specialist
```

Peter has a sales or consulting meeting, comes away with a transcript or a pile
of notes, and wants it to *become a tracked project* — not just a tidy summary.
This skill does that in one shot: it reads the meeting, writes a **Weekly Project
Update**, and then lays down the three things the engagement needs to live in the
system — a **Drive project folder**, a **kickoff/context Doc** so whoever picks it
up starts with context, and a **CRM deal** with a real activity timeline (the
meeting itself, a note carrying the workspace links, and a task for each
"What's Next" item).

It runs **autonomously**: read → summarise → create → report. No mid-run
confirmation. Each run is a fresh debrief, so it **always creates a new deal and
a new folder** — there is no dedupe and no "append to the existing deal". If Peter
runs it twice on the same meeting he gets two deals; that's intended (re-running
is how you redo a botched capture). Override any inferred field by just telling it.

## How this differs from its neighbours

- **project-note-specialist** — only reorganises messy notes into a Weekly Update
  and stops. It touches no Drive folder and no CRM. Use it when Peter just wants
  the words cleaned up.
- **consult-intake** — a weekly BATCH job that reads inbound `website@zynkr.ai`
  consult emails and de-dupes leads into deals. Use it for the inbox sweep.
- **consult-project-specialist** (this one) — takes ONE meeting and documents it as
  a project + deal, always-new, with a full activity timeline.

## Fixed facts (don't re-derive these)

- **Supabase project_id**: `uomieoqlkazknjgmfdda` (the shared Zynkr project; CRM tables are `crm_*`)
- **Google account** for all Gmail/Drive/Docs tools: `peter_tu@zynkr.ai`
- **Drive parent folder** (`[2.2] 業務與顧問部門：專案`, where numbered project folders go): `1hkXPX7OXPFOU0BcloPbJSFp8O0zArM8t`
- **CRM deal URL** for the doc/report/backlink: `https://platform.zynkr.ai/deals/{deal_id}`
- **CRM company / contact URLs** look like `https://platform.zynkr.ai/companies/{id}` and `.../contacts/{id}` — the `{id}` is a uuid you can pass straight into the SQL.
- Owner (`Peter Tu`) and pipeline (`銷售流程`) are looked up **live inside the SQL** — never hardcode their ids.

---

## Workflow

### 1 · Acquire the input

The meeting can arrive three ways:
- **Pasted text** — use it directly.
- **A Google Doc / Gemini Notes link** — read it with
  `mcp__google-workspace__get_doc_content(user_google_email="peter_tu@zynkr.ai", document_id="<id>")`.
  Gemini Notes docs have a `Notes` tab (summary + action items) and a
  `Transcript` tab (verbatim) — read both; the transcript carries the real detail.
- **A Gmail thread** — read it with the Gmail tools if that's what Peter points at.

Also capture any **CRM context** Peter gives:
- A `…/companies/{id}` or `…/contacts/{id}` or `…/deals/{id}` URL → pull the `{id}`
  (a uuid) and pass it as `{{COMPANY_ID}}` / `{{CONTACT_ID}}` so the deal links to
  the existing record instead of creating a duplicate company/contact.
- Otherwise read the company name + contact name / title / email out of the notes.

### 2 · Write the Weekly Project Update

Produce the same four-section format as project-note-specialist and show it to
Peter:

```
Weekly Project Update

1. Summary Update      — a concise overview of this meeting's themes
2. Progress            — what was covered / decided / discovered
3. Blockers / challenges — current issues, root causes, dependencies
4. What's Next         — planned actions, decisions needed, priorities
```

Reorganise scattered ideas into clear bullets. Infer context logically but do not
fabricate. If a section has no material, write "No updates this week."

### 3 · Extract the structured fields

From the meeting, pull:
- **Company** name (and id if a CRM URL was given).
- **Contact** — first/last name, title, email (and id if given).
- **Project title** — a short, glanceable label, e.g. `流程自動化導入`.
- **Deal attributes** — see *Inference defaults* below.
- **Tasks** — turn each actionable "What's Next" item into one task.

### 4 · Create the numbered Drive folder

Name it **`[N] Company（Project）`** — e.g. `[3] 瓅研企業（流程自動化導入）`. If the
company is blank, use `[N] Project`.

Compute `N` by listing the parent **once** and scanning **folders** (not files)
for a leading `[number]`:

```
mcp__google-workspace__list_drive_items(
  user_google_email = "peter_tu@zynkr.ai",
  folder_id = "1hkXPX7OXPFOU0BcloPbJSFp8O0zArM8t"
)
```

`N` = (highest `[number]` among folders) + 1, or `1` if none are numbered. Then:

```
mcp__google-workspace__create_drive_file(
  user_google_email = "peter_tu@zynkr.ai",
  file_name  = "[N] Company（Project）",
  folder_id  = "1hkXPX7OXPFOU0BcloPbJSFp8O0zArM8t",
  mime_type  = "application/vnd.google-apps.folder",
  content    = " "
)
```

Capture the new folder's `id`. (Pass a single-space `content` — the tool rejects a
completely empty call even for a folder.)

### 5 · Create the kickoff / context Doc

Read `references/kickoff-doc-template.md`, fill its placeholders, create the Doc,
then move it into the project folder (this two-step is reliable; creating a Doc
directly via `create_drive_file` with the document mime-type returns HTTP 400):

```
## 1. create the doc (lands in My Drive root)
mcp__google-workspace__create_doc(
  user_google_email = "peter_tu@zynkr.ai",
  title   = "[Kickoff] {{PROJECT_NAME}} — 專案脈絡與會議紀錄",
  content = "<filled-in template>"
)
## 2. move it into the project folder (capture the doc id from step 1)
mcp__google-workspace__update_drive_file(
  user_google_email = "peter_tu@zynkr.ai",
  file_id    = "<doc id>",
  add_parents = "<folder id from step 4>"
)
```

Capture the doc link.

### 6 · Create the CRM deal + activity timeline

Read `references/deal-insert.sql`, fill the placeholders, and run it via
`mcp__supabase__execute_sql(project_id="uomieoqlkazknjgmfdda", query=...)`. One
statement resolves the company + contact (by id if given, else find-or-create),
inserts a **new** deal, and logs the activities: a `meeting` row (the session), a
`note` row (carrying the folder / doc / source links), and one `task` row per
"What's Next" item. It returns the `deal_id` and an activity count.

Escape single quotes by doubling them (`O'Brien` → `O''Brien`). Build the deal
`name` as **`Company Project`** (e.g. `瓅研企業 (TheM) 流程自動化導入`).

### 7 · Backlink the folder to the deal

Include the folder URL in `{{NOTES}}` when you build the deal, or append it after:

```sql
UPDATE crm_deals SET notes = COALESCE(notes,'') || E'\n\n專案資料夾：<folder url>' WHERE id = '<deal_id>';
```

### 8 · Report

Re-show the Weekly Project Update, then a compact artifact table:

```
專案已建立：瓅研企業 (TheM) 流程自動化導入

| 產出 | 連結 |
|------|------|
| Drive 資料夾 | [3] 瓅研企業（流程自動化導入） |
| Kickoff 文件 | <doc url> |
| CRM Deal | <deal url> |
| 活動 | meeting · note · N tasks |
```

---

## Inference defaults (Peter overrides by just saying so)

These live in the prompt; pick the closest enum value from the meeting and pass it
into the SQL. When the meeting gives no signal, use the fallback.

- **stage** (`new|contacted|qualified|proposal|won|lost`) — a meeting happened, so
  default **`contacted`**; clear commit / "we're doing this" signal → **`qualified`**;
  numbers/scope on the table → `proposal`.
- **service_tier** (`workshop|coaching|transformation|advisory|other`) — infer from
  the work: a full process refactor / automation build → **`transformation`**; a
  one-off session → `workshop`; ongoing advice → `advisory` (fallback).
- **priority** (`low|medium|high`) — default **`medium`**; hot / near-closed → `high`.
- **lead_source** (`content|workshop|referral|outbound|other`) — default
  **`referral`** for a warm intro; `other` if genuinely unclear.
- **value** — `NULL` unless a concrete figure was agreed (don't bank a hypothetical).
- **close_date** — `NULL` unless a date was stated.

## Why it's built this way

- **Autonomous, not confirm-first** — Peter runs it and comes back to a finished
  project. Correctness comes from the skill doing exactly what a manual "Create
  Deal" + folder + doc would, in one pass.
- **Always-new, no dedupe** — unlike consult-intake (a recurring inbox sweep that
  must not double-book a lead), this is invoked once per meeting on purpose. A
  second run is a deliberate redo, so it should produce a fresh deal — no silent
  "skipped, already exists" that hides a real capture.
- **One SQL statement** — deal + company + contact + the whole activity timeline
  land atomically, so a run never leaves half-built records.

## Optional — draft a stakeholder email

If Peter also asks to "send/draft this to <someone>", draft (don't send) a Gmail
with the Weekly Update via `mcp__google-workspace__draft_gmail_message`
(`body_format="html"`). Off by default — only when he asks.
