Skip to content

The open alternative to Salesforce, designed for AI.

v1.7.2 — feat(partners): add opportunity process playbooks (#24956)

Rashad Karanouh2d4d9640a3d6
diff --git a/packages/twenty-apps/internal/twenty-partners/AGENTS.md b/packages/twenty-apps/internal/twenty-partners/AGENTS.md
index 730cc38ea63..cd8500cb939 100644
--- a/packages/twenty-apps/internal/twenty-partners/AGENTS.md
+++ b/packages/twenty-apps/internal/twenty-partners/AGENTS.md
@@ -118,6 +118,30 @@ of the following, update the playbook in the same change:
Facts on the page come from the same constants the view and intake use. Do
not leave stale steps. Do not keep a second copy on twenty.com or in a Note.
+## Opportunity process playbooks
+
+How to process (Matching Admin) and How to apply (Partner Workspace) are
+standalone pages under `src/modules/opportunity/how-to-process/`. They must
+stay in lockstep with real operator behaviour. Update the matching page and
+its copy test in the same change when you change any of:
+
+- Intake (marketplace brief already Listed + Discord; Twenty Internal
+ unlisted; `/twenty-lead-brief` writes Design Doc URL)
+- Listing (`Listed` flip → Discord; daily digest; Open Briefs membership)
+- Intro (`Intro Sent At` turns Listed off; Invited applications)
+- Win (set Partner → Won / Declined; Backup stays; unassign reopens Won
+ to Applied; Deals stages New → Screening → Meeting → Proposal → Customer)
+- Apply (Open Briefs listed-only; pitch minimum; one pitch; state meaning)
+- Bundled skills (`twenty-lead-brief`, `twenty-partner-shortlist`,
+ `twenty-partner-intro`): local run, expected output, GitHub URL of
+ `SKILL.md`
+- Match via MCP: the operator can ask the agent to write CRM changes
+
+Pages stay operator language. Skill names, slash triggers, and GitHub URLs
+of those bundled skills are allowed on How to process. Open Briefs and
+My Applications links are required on How to apply. Do not open Apply
+from the standalone page — Apply is pinned on the brief record.
+
## Where does new code go?
External API call → `connector/`. Raw query/mutation → `graphql/`. Any logic →
diff --git a/packages/twenty-apps/internal/twenty-partners/package.json b/packages/twenty-apps/internal/twenty-partners/package.json
index a44db8b9ff0..03fcfa203b1 100644
--- a/packages/twenty-apps/internal/twenty-partners/package.json
+++ b/packages/twenty-apps/internal/twenty-partners/package.json
@@ -1,6 +1,6 @@
{
"name": "twenty-partners",
- "version": "1.7.1",
+ "version": "1.7.2",
"license": "MIT",
"engines": {
"node": "^24.5.0",
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/navigation-menu-items/my-applications.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/navigation-menu-items/my-applications.navigation-menu-item.ts
index 00085f67fa9..54779043062 100644
--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/navigation-menu-items/my-applications.navigation-menu-item.ts
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/application/navigation-menu-items/my-applications.navigation-menu-item.ts
@@ -8,7 +8,7 @@ export default defineNavigationMenuItem({
universalIdentifier: '71c418f0-5761-4797-830a-2cae6d4bdd49',
type: NavigationMenuItemType.VIEW,
icon: 'IconSend',
- position: 1,
+ position: 2,
folderUniversalIdentifier: PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER,
viewUniversalIdentifier: MY_APPLICATIONS_VIEW_UNIVERSAL_IDENTIFIER,
});
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/admin-copy.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/admin-copy.test.ts
new file mode 100644
index 00000000000..e33d98e9d89
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/admin-copy.test.ts
@@ -0,0 +1,108 @@
+import { readFileSync } from 'node:fs';
+import { dirname, resolve } from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+import { describe, expect, it } from 'vitest';
+
+import {
+ DEAL_BOARD_STAGE_LABELS,
+ DISCORD_CHAT_URL,
+ HOW_TO_PROCESS_BODY_LINKS,
+ HOW_TO_PROCESS_STEPS,
+} from './admin-copy';
+
+const APPLICATION_OBJECT_SOURCE = readFileSync(
+ resolve(
+ dirname(fileURLToPath(import.meta.url)),
+ '../../../application/objects/application.object.ts',
+ ),
+ 'utf8',
+);
+
+describe('HOW_TO_PROCESS_STEPS', () => {
+ it('uses Deals-board stage labels from OPPORTUNITY_STAGE_OPTIONS', () => {
+ const expected = [
+ 'New',
+ 'Screening',
+ 'Meeting',
+ 'Proposal',
+ 'Customer',
+ ];
+
+ expect(DEAL_BOARD_STAGE_LABELS).toEqual(expected);
+
+ const winnerStep = HOW_TO_PROCESS_STEPS.find((step) => step.num === '06');
+ expect(winnerStep?.body).toContain(expected.join(' → '));
+ });
+
+ it('states the six automations the operator must not double-do', () => {
+ const text = HOW_TO_PROCESS_STEPS.map((step) =>
+ [step.body, step.note, ...(step.bullets ?? [])].join('\n'),
+ ).join('\n');
+
+ expect(text).toMatch(/already Listed/i);
+ expect(text).toMatch(/Discord/i);
+ expect(text).toMatch(/Twenty Internal/);
+ expect(text).not.toMatch(/\bTFT\b/);
+ expect(text).toMatch(/daily digest/i);
+ expect(text).toMatch(/Intro Sent At/i);
+ expect(text).toMatch(/Listed.*off/i);
+ expect(text).toMatch(/Won/i);
+ expect(text).toMatch(/Declined/i);
+ expect(text).toMatch(/Backup stays/i);
+ });
+
+ it('uses Application state labels from application.object.ts', () => {
+ for (const label of ['Applied', 'Invited', 'Won', 'Declined', 'Backup']) {
+ expect(APPLICATION_OBJECT_SOURCE).toContain(`label: '${label}'`);
+ }
+
+ const matchStep = HOW_TO_PROCESS_STEPS.find((step) => step.num === '04');
+ expect(matchStep?.pills?.join(' ')).toMatch(/Applied/);
+ expect(matchStep?.pills?.join(' ')).toMatch(/Invited/);
+ });
+
+ it('names each skill, says run locally, and points at GitHub', () => {
+ const prepareStep = HOW_TO_PROCESS_STEPS.find((step) => step.num === '02');
+ const matchStep = HOW_TO_PROCESS_STEPS.find((step) => step.num === '04');
+ const introStep = HOW_TO_PROCESS_STEPS.find((step) => step.num === '05');
+ const leadBrief = prepareStep?.skills?.[0];
+ const shortlist = matchStep?.skills?.[0];
+ const intro = introStep?.skills?.[0];
+
+ expect(prepareStep?.body).toMatch(/Design Doc URL/);
+ expect(prepareStep?.body).not.toMatch(/run locally/i);
+ expect(leadBrief?.name).toBe('twenty-lead-brief');
+ expect(leadBrief?.trigger).toBe('/twenty-lead-brief');
+ expect(leadBrief?.githubUrl).toContain(
+ 'src/skills/twenty-lead-brief/SKILL.md',
+ );
+ expect(leadBrief?.outputs.join('\n')).toMatch(/Design Doc URL/);
+ expect(leadBrief?.outputs.join('\n')).toMatch(/partner-match-criteria/);
+
+ expect(matchStep?.body).toContain('/twenty-partner-shortlist');
+ expect(matchStep?.body).toContain('/twenty-lead-brief');
+ expect(matchStep?.body).toContain('/twenty-partner-intro');
+ expect(matchStep?.body).toMatch(/MCP/);
+ expect(matchStep?.body).toMatch(/changes in the CRM/i);
+ expect(shortlist?.name).toBe('twenty-partner-shortlist');
+ expect(shortlist?.githubUrl).toContain(
+ 'src/skills/twenty-partner-shortlist/SKILL.md',
+ );
+
+ expect(introStep?.body).toContain('/twenty-partner-intro');
+ expect(intro?.name).toBe('twenty-partner-intro');
+ expect(intro?.githubUrl).toContain(
+ 'src/skills/twenty-partner-intro/SKILL.md',
+ );
+ });
+
+ it('links Discord', () => {
+ expect(HOW_TO_PROCESS_BODY_LINKS).toEqual([
+ { label: 'Discord', href: DISCORD_CHAT_URL },
+ ]);
+ expect(DISCORD_CHAT_URL).toBe(
+ 'https://discord.com/channels/1130383047699738754/1513506376595538032',
+ );
+ });
+});
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/admin-copy.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/admin-copy.ts
new file mode 100644
index 00000000000..b790d10ea73
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/admin-copy.ts
@@ -0,0 +1,73 @@
+import { OPPORTUNITY_STAGE_OPTIONS } from 'src/modules/opportunity/constants/opportunity-stage-options';
+import {
+ PLAYBOOK_SKILL_INTRO,
+ PLAYBOOK_SKILL_LEAD_BRIEF,
+ PLAYBOOK_SKILL_SHORTLIST,
+} from 'src/modules/opportunity/how-to-process/constants/playbook-skills';
+import { type PlaybookStep } from 'src/modules/opportunity/how-to-process/types/playbook-step.type';
+import { type PlaybookLink } from 'src/modules/opportunity/how-to-process/utils/playbook-nav';
+
+export const DISCORD_CHAT_URL =
+ 'https://discord.com/channels/1130383047699738754/1513506376595538032';
+
+export const HOW_TO_PROCESS_KICKER = 'Playbook';
+export const HOW_TO_PROCESS_TITLE = 'How to process';
+export const HOW_TO_PROCESS_LEDE =
+ 'This is the path from a new deal to a winner. Each step says what you do, then what the app does.';
+
+export const HOW_TO_PROCESS_BODY_LINKS: readonly PlaybookLink[] = [
+ { label: 'Discord', href: DISCORD_CHAT_URL },
+];
+
+export const DEAL_BOARD_STAGE_LABELS = OPPORTUNITY_STAGE_OPTIONS.filter(
+ (option) => option.value !== 'DONE' && option.value !== 'DEAD',
+).map((option) => option.label);
+
+const DEAL_STAGE_PATH = DEAL_BOARD_STAGE_LABELS.join(' → ');
+
+export const HOW_TO_PROCESS_STEPS: PlaybookStep[] = [
+ {
+ num: '01',
+ heading: 'Where the deal comes from',
+ body: 'Three intakes. Treat each one differently.',
+ bullets: [
+ 'Marketplace brief — already Listed. Discord gets a ping on submit. Do not list it again.',
+ 'Twenty Internal — not listed. You list it later.',
+ 'Sales call — /twenty-lead-brief writes the Opportunity and the Design Doc URL.',
+ ],
+ },
+ {
+ num: '02',
+ heading: 'Prepare the brief',
+ body: 'Fill Need, Requirements, and Design Doc URL from the skill output. Do not intro without the doc. Partner mail carries that link.',
+ skills: [PLAYBOOK_SKILL_LEAD_BRIEF],
+ },
+ {
+ num: '03',
+ heading: 'List, or do not',
+ body: 'Turn Listed on when partners may see the brief. Open Briefs then shows the row. Discord pings on that flip. A daily digest mails validated partners. Do not also mail the whole directory.',
+ note: 'A marketplace brief is already Listed. Do not list twice.',
+ },
+ {
+ num: '04',
+ heading: 'Match',
+ body: 'Briefs to Match is the queue with no Partner yet. You can do all of this through MCP. Ask the agent to make the changes in the CRM. Skills are also available: /twenty-partner-shortlist, or wait for applications. /twenty-lead-brief is available if the brief is still thin. /twenty-partner-intro is available once you name the partners.',
+ pills: [
+ 'Applied — the partner came in',
+ 'Invited — you pushed them',
+ ],
+ skills: [PLAYBOOK_SKILL_SHORTLIST],
+ },
+ {
+ num: '05',
+ heading: 'Intro',
+ body: 'After you name the partners, /twenty-partner-intro creates Invited rows and sets Intro Sent At. The app then turns Listed off.',
+ note: 'Do not send a second wave unless you mean to.',
+ skills: [PLAYBOOK_SKILL_INTRO],
+ },
+ {
+ num: '06',
+ heading: 'Pick the winner',
+ body: `Set Partner on the Opportunity. The winner Application goes to Won. The others go to Declined. Backup stays. Clear Partner and only Won returns to Applied. Move the deal on Deals: ${DEAL_STAGE_PATH}.`,
+ },
+];
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/agents-lockstep.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/agents-lockstep.test.ts
new file mode 100644
index 00000000000..17a86433cb7
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/agents-lockstep.test.ts
@@ -0,0 +1,26 @@
+import { readFileSync } from 'node:fs';
+import { dirname, resolve } from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+import { describe, expect, it } from 'vitest';
+
+const AGENTS_MD = readFileSync(
+ resolve(dirname(fileURLToPath(import.meta.url)), '../../../../../AGENTS.md'),
+ 'utf8',
+);
+
+describe('AGENTS.md opportunity playbooks', () => {
+ it('requires lockstep updates for How to process and How to apply', () => {
+ expect(AGENTS_MD).toContain('How to process');
+ expect(AGENTS_MD).toContain('How to apply');
+ expect(AGENTS_MD).toContain('lockstep');
+ expect(AGENTS_MD).toContain('Open Briefs');
+ expect(AGENTS_MD).toContain('My Applications');
+ expect(AGENTS_MD).toMatch(/operator language/i);
+ expect(AGENTS_MD).toContain('twenty-lead-brief');
+ expect(AGENTS_MD).toContain('GitHub');
+ expect(AGENTS_MD).toContain('Twenty Internal');
+ expect(AGENTS_MD).toContain('MCP');
+ expect(AGENTS_MD).toMatch(/Do not open Apply/);
+ });
+});
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/how-to-process.constants.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/how-to-process.constants.ts
new file mode 100644
index 00000000000..65e1169b8d6
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/how-to-process.constants.ts
@@ -0,0 +1,21 @@
+export const HOW_TO_PROCESS_FRONT_COMPONENT_ID =
+ '1fb20c84-f25e-4e6e-ac26-ac973fe45c03';
+export const HOW_TO_PROCESS_PAGE_LAYOUT_ID =
+ '0fcc49da-fd43-4f96-9b61-9bf32bd7e18b';
+export const HOW_TO_PROCESS_PAGE_TAB_ID =
+ '56b8edd7-5d3b-4928-be03-96969bb3670e';
+export const HOW_TO_PROCESS_PAGE_WIDGET_ID =
+ '756fc44b-9a05-41fa-a171-2148ab1536c4';
+export const HOW_TO_PROCESS_NAV_ITEM_ID =
+ '23a068ec-8f9f-496e-9b58-22aae5348682';
+
+export const HOW_TO_APPLY_FRONT_COMPONENT_ID =
+ '3770f0a4-408c-42cf-ac80-fe1752b40625';
+export const HOW_TO_APPLY_PAGE_LAYOUT_ID =
+ 'a35eb9dd-c828-4bad-8bfb-986e1c9e9cde';
+export const HOW_TO_APPLY_PAGE_TAB_ID =
+ '8ec88001-040c-474a-af00-372d87a51501';
+export const HOW_TO_APPLY_PAGE_WIDGET_ID =
+ '3ceda86c-e3ab-447c-9be6-b4a692c3d71a';
+export const HOW_TO_APPLY_NAV_ITEM_ID =
+ 'b8d751cf-978c-4291-89cb-478d639a8539';
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/partner-copy.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/partner-copy.test.ts
new file mode 100644
index 00000000000..ae3b51d3483
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/partner-copy.test.ts
@@ -0,0 +1,56 @@
+import { describe, expect, it } from 'vitest';
+
+import {
+ MIN_PITCH_LENGTH,
+ PITCHABLE_STATES,
+} from 'src/modules/application/apply/constants/apply-to-brief.constants';
+
+import {
+ HOW_TO_APPLY_BODY_LINKS,
+ HOW_TO_APPLY_HEADER_LINKS,
+ HOW_TO_APPLY_STEPS,
+} from './partner-copy';
+
+describe('HOW_TO_APPLY_STEPS', () => {
+ it('uses MIN_PITCH_LENGTH for the pitch rule', () => {
+ const applyStep = HOW_TO_APPLY_STEPS.find((step) => step.num === '02');
+ expect(applyStep?.body).toContain(String(MIN_PITCH_LENGTH));
+ });
+
+ it('states one application, pitch not editable, and Won/Declined are not partner-set', () => {
+ const text = HOW_TO_APPLY_STEPS.map((step) =>
+ [step.body, step.note, ...(step.bullets ?? [])].join('\n'),
+ ).join('\n');
+
+ expect(text).toMatch(/one application per brief/i);
+ expect(text).toMatch(/cannot edit/i);
+ expect(text).toMatch(/Won/);
+ expect(text).toMatch(/Declined/);
+ expect(text).toMatch(/do not set those/i);
+ });
+
+ it('names unpitchable states as the complement of PITCHABLE_STATES', () => {
+ const applyStep = HOW_TO_APPLY_STEPS.find((step) => step.num === '02');
+
+ expect([...PITCHABLE_STATES].sort()).toEqual([
+ 'APPLIED',
+ 'BACKUP',
+ 'INVITED',
+ ]);
+ expect(applyStep?.note).toContain('Introduced');
+ expect(applyStep?.note).toContain('Won');
+ expect(applyStep?.note).toContain('Declined');
+ expect(applyStep?.note).toMatch(/cannot take a pitch/i);
+ });
+
+ it('links Open Briefs and My Applications at the top, not Apply', () => {
+ expect(HOW_TO_APPLY_HEADER_LINKS).toEqual([
+ { label: 'Open Briefs', action: 'openBriefs' },
+ { label: 'My Applications', action: 'myApplications' },
+ ]);
+ expect(HOW_TO_APPLY_BODY_LINKS).toBe(HOW_TO_APPLY_HEADER_LINKS);
+
+ const applyStep = HOW_TO_APPLY_STEPS.find((step) => step.num === '02');
+ expect(applyStep?.body).toMatch(/Apply at the top/i);
+ });
+});
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/partner-copy.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/partner-copy.ts
new file mode 100644
index 00000000000..20dec854d1b
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/partner-copy.ts
@@ -0,0 +1,35 @@
+import { MIN_PITCH_LENGTH } from 'src/modules/application/apply/constants/apply-to-brief.constants';
+import { type PlaybookStep } from 'src/modules/opportunity/how-to-process/types/playbook-step.type';
+import { type PlaybookLink } from 'src/modules/opportunity/how-to-process/utils/playbook-nav';
+
+export const HOW_TO_APPLY_KICKER = 'Playbook';
+export const HOW_TO_APPLY_TITLE = 'How to apply';
+export const HOW_TO_APPLY_LEDE =
+ 'Open Briefs is the live marketplace. Apply is pinned at the top of each brief. Twenty picks the winner.';
+
+export const HOW_TO_APPLY_HEADER_LINKS: readonly PlaybookLink[] = [
+ { label: 'Open Briefs', action: 'openBriefs' },
+ { label: 'My Applications', action: 'myApplications' },
+];
+
+export const HOW_TO_APPLY_BODY_LINKS = HOW_TO_APPLY_HEADER_LINKS;
+
+export const HOW_TO_APPLY_STEPS: PlaybookStep[] = [
+ {
+ num: '01',
+ heading: 'Open Briefs',
+ body: 'Open Briefs is the live marketplace. A row is here only when Twenty has listed the brief. If it is gone, the brief is closed or already in intro.',
+ },
+ {
+ num: '02',
+ heading: 'Apply',
+ body: `Open the brief. Use Apply at the top of the record. Write a pitch of at least ${MIN_PITCH_LENGTH} characters. The pitch is set once. You cannot edit it later. One application per brief. A second apply is rejected.`,
+ note: 'If Twenty already invited you, Apply fills the pitch on that row. The state stays Invited or Backup. Introduced, Won, and Declined cannot take a pitch.',
+ },
+ {
+ num: '03',
+ heading: 'What happens next',
+ body: 'Your row lands in My Applications as Applied. Twenty may also invite you. Then the row is Invited. After an intro, wait for Twenty. Do not chase the client unless Twenty asks. Won or Declined is set when Twenty picks the Partner. You do not set those yourself.',
+ note: 'A listed brief can still have a decided row. Listing and the winner field are not the same thing.',
+ },
+];
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/playbook-skills.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/playbook-skills.test.ts
new file mode 100644
index 00000000000..c53ee3c6499
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/playbook-skills.test.ts
@@ -0,0 +1,25 @@
+import { existsSync } from 'node:fs';
+import { dirname, resolve } from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+import { describe, expect, it } from 'vitest';
+
+import { PLAYBOOK_SKILLS } from './playbook-skills';
+
+const SKILLS_ROOT = resolve(
+ dirname(fileURLToPath(import.meta.url)),
+ '../../../../skills',
+);
+
+describe('PLAYBOOK_SKILLS', () => {
+ it('points each GitHub URL at a SKILL.md that exists in this app', () => {
+ for (const skill of PLAYBOOK_SKILLS) {
+ expect(
+ existsSync(resolve(SKILLS_ROOT, skill.name, 'SKILL.md')),
+ ).toBe(true);
+ expect(skill.githubUrl).toBe(
+ `https://github.com/twentyhq/twenty/blob/main/packages/twenty-apps/internal/twenty-partners/src/skills/${skill.name}/SKILL.md`,
+ );
+ }
+ });
+});
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/playbook-skills.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/playbook-skills.ts
new file mode 100644
index 00000000000..99da16dca2f
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/playbook-skills.ts
@@ -0,0 +1,49 @@
+const SKILL_GITHUB_BASE =
+ 'https://github.com/twentyhq/twenty/blob/main/packages/twenty-apps/internal/twenty-partners/src/skills';
+
+export type PlaybookSkill = {
+ name: string;
+ trigger: string;
+ githubUrl: string;
+ outputs: readonly string[];
+};
+
+export const PLAYBOOK_SKILL_LEAD_BRIEF: PlaybookSkill = {
+ name: 'twenty-lead-brief',
+ trigger: '/twenty-lead-brief',
+ githubUrl: `${SKILL_GITHUB_BASE}/twenty-lead-brief/SKILL.md`,
+ outputs: [
+ 'A qualification summary in the conversation',
+ 'A partner brief — paste it into a Google Doc',
+ 'partner-match-criteria.md for the match step',
+ 'The Opportunity, with Design Doc URL set to that Doc',
+ ],
+};
+
+export const PLAYBOOK_SKILL_SHORTLIST: PlaybookSkill = {
+ name: 'twenty-partner-shortlist',
+ trigger: '/twenty-partner-shortlist',
+ githubUrl: `${SKILL_GITHUB_BASE}/twenty-partner-shortlist/SKILL.md`,
+ outputs: [
+ 'A shortlist with a reason for each name',
+ 'partner-shortlist.md in the lead folder',
+ 'No CRM write — you review, then intro',
+ ],
+};
+
+export const PLAYBOOK_SKILL_INTRO: PlaybookSkill = {
+ name: 'twenty-partner-intro',
+ trigger: '/twenty-partner-intro',
+ githubUrl: `${SKILL_GITHUB_BASE}/twenty-partner-intro/SKILL.md`,
+ outputs: [
+ 'Invited application rows for the names you picked',
+ 'Intro Sent At on the Opportunity',
+ 'Gmail drafts that carry the Design Doc URL',
+ ],
+};
+
+export const PLAYBOOK_SKILLS: readonly PlaybookSkill[] = [
+ PLAYBOOK_SKILL_LEAD_BRIEF,
+ PLAYBOOK_SKILL_SHORTLIST,
+ PLAYBOOK_SKILL_INTRO,
+];
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/how-to-apply.front-component.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/how-to-apply.front-component.tsx
new file mode 100644
index 00000000000..725e39b16f0
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/how-to-apply.front-component.tsx
@@ -0,0 +1,31 @@
+import { defineFrontComponent } from 'twenty-sdk/define';
+
+import { HOW_TO_APPLY_FRONT_COMPONENT_ID } from 'src/modules/opportunity/how-to-process/constants/how-to-process.constants';
+import {
+ HOW_TO_APPLY_BODY_LINKS,
+ HOW_TO_APPLY_HEADER_LINKS,
+ HOW_TO_APPLY_KICKER,
+ HOW_TO_APPLY_LEDE,
+ HOW_TO_APPLY_STEPS,
+ HOW_TO_APPLY_TITLE,
+} from 'src/modules/opportunity/how-to-process/constants/partner-copy';
+import { PlaybookArticle } from 'src/modules/opportunity/how-to-process/front-components/playbook-article';
+
+const HowToApply = () => (
+ <PlaybookArticle
+ kicker={HOW_TO_APPLY_KICKER}
+ title={HOW_TO_APPLY_TITLE}
+ lede={HOW_TO_APPLY_LEDE}
+ steps={HOW_TO_APPLY_STEPS}
+ headerLinks={HOW_TO_APPLY_HEADER_LINKS}
+ bodyLinks={HOW_TO_APPLY_BODY_LINKS}
+ />
+);
+
+export default defineFrontComponent({
+ universalIdentifier: HOW_TO_APPLY_FRONT_COMPONENT_ID,
+ name: 'How to apply',
+ description:
+ 'Partner playbook for Open Briefs and apply in Partner Workspace.',
+ component: HowToApply,
+});
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/how-to-process.front-component.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/how-to-process.front-component.tsx
new file mode 100644
index 00000000000..629feab072f
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/how-to-process.front-component.tsx
@@ -0,0 +1,31 @@
+import { defineFrontComponent } from 'twenty-sdk/define';
+
+import {
+ HOW_TO_PROCESS_BODY_LINKS,
+ HOW_TO_PROCESS_KICKER,
+ HOW_TO_PROCESS_LEDE,
+ HOW_TO_PROCESS_STEPS,
+ HOW_TO_PROCESS_TITLE,
+} from 'src/modules/opportunity/how-to-process/constants/admin-copy';
+import { HOW_TO_PROCESS_FRONT_COMPONENT_ID } from 'src/modules/opportunity/how-to-process/constants/how-to-process.constants';
+import { PLAYBOOK_SKILLS } from 'src/modules/opportunity/how-to-process/constants/playbook-skills';
+import { PlaybookArticle } from 'src/modules/opportunity/how-to-process/front-components/playbook-article';
+
+const HowToProcess = () => (
+ <PlaybookArticle
+ kicker={HOW_TO_PROCESS_KICKER}
+ title={HOW_TO_PROCESS_TITLE}
+ lede={HOW_TO_PROCESS_LEDE}
+ steps={HOW_TO_PROCESS_STEPS}
+ bodyLinks={HOW_TO_PROCESS_BODY_LINKS}
+ skills={PLAYBOOK_SKILLS}
+ />
+);
+
+export default defineFrontComponent({
+ universalIdentifier: HOW_TO_PROCESS_FRONT_COMPONENT_ID,
+ name: 'How to process',
+ description:
+ 'Admin playbook for the opportunity path in Matching Admin Workspace.',
+ component: HowToProcess,
+});
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-article.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-article.tsx
new file mode 100644
index 00000000000..d67b3de8edf
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-article.tsx
@@ -0,0 +1,104 @@
+import { type PlaybookSkill } from 'src/modules/opportunity/how-to-process/constants/playbook-skills';
+import { PlaybookMarkedText } from 'src/modules/opportunity/how-to-process/front-components/playbook-marked-text';
+import { PlaybookNavLink } from 'src/modules/opportunity/how-to-process/front-components/playbook-nav-link';
+import { PlaybookSkillBlock } from 'src/modules/opportunity/how-to-process/front-components/playbook-skill-block';
+import { type PlaybookStep } from 'src/modules/opportunity/how-to-process/types/playbook-step.type';
+import { type PlaybookLink } from 'src/modules/opportunity/how-to-process/utils/playbook-nav';
+import { PLAYBOOK_STYLES as styles } from 'src/modules/shared/front-components/playbook-styles';
+
+type PlaybookArticleProps = {
+ kicker: string;
+ title: string;
+ lede: string;
+ steps: PlaybookStep[];
+ headerLinks?: ReadonlyArray<PlaybookLink>;
+ bodyLinks?: ReadonlyArray<PlaybookLink>;
+ skills?: ReadonlyArray<PlaybookSkill>;
+};
+
+export const PlaybookArticle = ({
+ kicker,
+ title,
+ lede,
+ steps,
+ headerLinks,
+ bodyLinks = [],
+ skills = [],
+}: PlaybookArticleProps) => (
+ <div style={styles.root}>
+ <article style={styles.article}>
+ <p style={styles.kicker}>{kicker}</p>
+ <h1 style={styles.title}>{title}</h1>
+ <p
+ style={
+ headerLinks !== undefined ? styles.ledeWithLinks : styles.lede
+ }
+ >
+ <PlaybookMarkedText text={lede} links={bodyLinks} skills={skills} />
+ </p>
+ {headerLinks !== undefined ? (
+ <nav style={styles.headerLinkRow}>
+ {headerLinks.map((link) => (
+ <PlaybookNavLink key={link.label} link={link}>
+ {link.label}
+ </PlaybookNavLink>
+ ))}
+ </nav>
+ ) : null}
+ {steps.map((step, index) => (
+ <section
+ key={step.num}
+ style={index === steps.length - 1 ? styles.lastStep : styles.step}
+ >
+ <div style={styles.num}>{step.num}</div>
+ <div>
+ <h2 style={styles.heading}>{step.heading}</h2>
+ <p style={styles.body}>
+ <PlaybookMarkedText
+ text={step.body}
+ links={bodyLinks}
+ skills={skills}
+ />
+ </p>
+ {step.pills !== undefined ? (
+ <div style={styles.pillRow}>
+ {step.pills.map((pill) => (
+ <span key={pill} style={styles.pill}>
+ {pill}
+ </span>
+ ))}
+ </div>
+ ) : null}
+ {step.bullets !== undefined ? (
+ <ul style={styles.list}>
+ {step.bullets.map((bullet) => (
+ <li key={bullet}>
+ <PlaybookMarkedText
+ text={bullet}
+ links={bodyLinks}
+ skills={skills}
+ />
+ </li>
+ ))}
+ </ul>
+ ) : null}
+ {step.skills !== undefined
+ ? step.skills.map((skill) => (
+ <PlaybookSkillBlock key={skill.name} skill={skill} />
+ ))
+ : null}
+ {step.note !== undefined ? (
+ <p style={styles.note}>
+ <PlaybookMarkedText
+ text={step.note}
+ links={bodyLinks}
+ skills={skills}
+ />
+ </p>
+ ) : null}
+ </div>
+ </section>
+ ))}
+ </article>
+ </div>
+);
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-marked-text.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-marked-text.tsx
new file mode 100644
index 00000000000..443000fe864
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-marked-text.tsx
@@ -0,0 +1,45 @@
+import { type PlaybookSkill } from 'src/modules/opportunity/how-to-process/constants/playbook-skills';
+import { PlaybookNavLink } from 'src/modules/opportunity/how-to-process/front-components/playbook-nav-link';
+import { type PlaybookLink } from 'src/modules/opportunity/how-to-process/utils/playbook-nav';
+import { splitPlaybookMarks } from 'src/modules/opportunity/how-to-process/utils/split-playbook-marks';
+import { PLAYBOOK_STYLES as styles } from 'src/modules/shared/front-components/playbook-styles';
+
+type PlaybookMarkedTextProps = {
+ text: string;
+ links?: ReadonlyArray<PlaybookLink>;
+ skills?: ReadonlyArray<PlaybookSkill>;
+};
+
+export const PlaybookMarkedText = ({
+ text,
+ links = [],
+ skills = [],
+}: PlaybookMarkedTextProps) => (
+ <>
+ {splitPlaybookMarks(text, { links, skills }).map((mark, index) => {
+ if (mark.kind === 'skill') {
+ return (
+ <a
+ key={`${mark.value}-${index}`}
+ href={mark.githubUrl}
+ target="_blank"
+ rel="noreferrer"
+ style={styles.link}
+ >
+ <code style={styles.code}>{mark.value}</code>
+ </a>
+ );
+ }
+
+ if (mark.kind === 'link') {
+ return (
+ <PlaybookNavLink key={`${mark.value}-${index}`} link={mark.link}>
+ {mark.value}
+ </PlaybookNavLink>
+ );
+ }
+
+ return <span key={`text-${index}`}>{mark.value}</span>;
+ })}
+ </>
+);
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-nav-link.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-nav-link.tsx
new file mode 100644
index 00000000000..66ddd9788f2
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-nav-link.tsx
@@ -0,0 +1,37 @@
+import {
+ type PlaybookLink,
+ runPlaybookNav,
+} from 'src/modules/opportunity/how-to-process/utils/playbook-nav';
+import { PLAYBOOK_STYLES as styles } from 'src/modules/shared/front-components/playbook-styles';
+
+type PlaybookNavLinkProps = {
+ link: PlaybookLink;
+ children: string;
+};
+
+export const PlaybookNavLink = ({ link, children }: PlaybookNavLinkProps) => {
+ if ('action' in link) {
+ return (
+ <button
+ type="button"
+ style={styles.linkButton}
+ onClick={() => {
+ void runPlaybookNav(link.action);
+ }}
+ >
+ {children}
+ </button>
+ );
+ }
+
+ return (
+ <a
+ href={link.href}
+ target="_blank"
+ rel="noreferrer"
+ style={styles.link}
+ >
+ {children}
+ </a>
+ );
+};
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-skill-block.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-skill-block.tsx
new file mode 100644
index 00000000000..09c942ee8e5
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-skill-block.tsx
@@ -0,0 +1,29 @@
+import { type PlaybookSkill } from 'src/modules/opportunity/how-to-process/constants/playbook-skills';
+import { PLAYBOOK_STYLES as styles } from 'src/modules/shared/front-components/playbook-styles';
+
+type PlaybookSkillBlockProps = {
+ skill: PlaybookSkill;
+};
+
+export const PlaybookSkillBlock = ({ skill }: PlaybookSkillBlockProps) => (
+ <div style={styles.skill}>
+ <p style={styles.skillKicker}>Run locally</p>
+ <p style={styles.body}>
+ <code style={styles.code}>{skill.trigger}</code>
+ {' · '}
+ <a
+ href={skill.githubUrl}
+ target="_blank"
+ rel="noreferrer"
+ style={styles.link}
+ >
+ View on GitHub
+ </a>
+ </p>
+ <ul style={styles.skillOutputs}>
+ {skill.outputs.map((output) => (
+ <li key={output}>{output}</li>
+ ))}
+ </ul>
+ </div>
+);
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/navigation-menu-items/how-to-apply.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/navigation-menu-items/how-to-apply.navigation-menu-item.ts
new file mode 100644
index 00000000000..7e21360abd9
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/navigation-menu-items/how-to-apply.navigation-menu-item.ts
@@ -0,0 +1,17 @@
+import { NavigationMenuItemType, defineNavigationMenuItem } from 'twenty-sdk/define';
+
+import {
+ HOW_TO_APPLY_NAV_ITEM_ID,
+ HOW_TO_APPLY_PAGE_LAYOUT_ID,
+} from 'src/modules/opportunity/how-to-process/constants/how-to-process.constants';
+import { PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER } from 'src/modules/shared/navigation-menu-items/partner-workspace-folder.navigation-menu-item';
+
+export default defineNavigationMenuItem({
+ universalIdentifier: HOW_TO_APPLY_NAV_ITEM_ID,
+ name: 'How to apply',
+ type: NavigationMenuItemType.PAGE_LAYOUT,
+ icon: 'IconListCheck',
+ position: 0,
+ folderUniversalIdentifier: PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER,
+ pageLayoutUniversalIdentifier: HOW_TO_APPLY_PAGE_LAYOUT_ID,
+});
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/navigation-menu-items/how-to-process.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/navigation-menu-items/how-to-process.navigation-menu-item.ts
new file mode 100644
index 00000000000..e03dad22648
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/navigation-menu-items/how-to-process.navigation-menu-item.ts
@@ -0,0 +1,16 @@
+import { NavigationMenuItemType, defineNavigationMenuItem } from 'twenty-sdk/define';
+
+import {
+ HOW_TO_PROCESS_NAV_ITEM_ID,
+ HOW_TO_PROCESS_PAGE_LAYOUT_ID,
+} from 'src/modules/opportunity/how-to-process/constants/how-to-process.constants';
+
+export default defineNavigationMenuItem({
+ universalIdentifier: HOW_TO_PROCESS_NAV_ITEM_ID,
+ name: 'How to process',
+ type: NavigationMenuItemType.PAGE_LAYOUT,
+ icon: 'IconListCheck',
+ position: 10,
+ folderUniversalIdentifier: '0b2e499a-ae74-45e0-af08-243e19fc56aa',
+ pageLayoutUniversalIdentifier: HOW_TO_PROCESS_PAGE_LAYOUT_ID,
+});
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/page-layouts/how-to-apply.page-layout.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/page-layouts/how-to-apply.page-layout.ts
new file mode 100644
index 00000000000..70e002f2896
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/page-layouts/how-to-apply.page-layout.ts
@@ -0,0 +1,34 @@
+import { PageLayoutTabLayoutMode, definePageLayout } from 'twenty-sdk/define';
+
+import {
+ HOW_TO_APPLY_FRONT_COMPONENT_ID,
+ HOW_TO_APPLY_PAGE_LAYOUT_ID,
+ HOW_TO_APPLY_PAGE_TAB_ID,
+ HOW_TO_APPLY_PAGE_WIDGET_ID,
+} from 'src/modules/opportunity/how-to-process/constants/how-to-process.constants';
+
+export default definePageLayout({
+ universalIdentifier: HOW_TO_APPLY_PAGE_LAYOUT_ID,
+ name: 'How to apply',
+ type: 'STANDALONE_PAGE',
+ tabs: [
+ {
+ universalIdentifier: HOW_TO_APPLY_PAGE_TAB_ID,
+ title: 'How to apply',
+ position: 0,
+ icon: 'IconListCheck',
+ layoutMode: PageLayoutTabLayoutMode.CANVAS,
+ widgets: [
+ {
+ universalIdentifier: HOW_TO_APPLY_PAGE_WIDGET_ID,
+ title: 'How to apply',
+ type: 'FRONT_COMPONENT',
+ configuration: {
+ configurationType: 'FRONT_COMPONENT',
+ frontComponentUniversalIdentifier: HOW_TO_APPLY_FRONT_COMPONENT_ID,
+ },
+ },
+ ],
+ },
+ ],
+});
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/page-layouts/how-to-process.page-layout.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/page-layouts/how-to-process.page-layout.ts
new file mode 100644
index 00000000000..e2f8d08403f
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/page-layouts/how-to-process.page-layout.ts
@@ -0,0 +1,34 @@
+import { PageLayoutTabLayoutMode, definePageLayout } from 'twenty-sdk/define';
+
+import {
+ HOW_TO_PROCESS_FRONT_COMPONENT_ID,
+ HOW_TO_PROCESS_PAGE_LAYOUT_ID,
+ HOW_TO_PROCESS_PAGE_TAB_ID,
+ HOW_TO_PROCESS_PAGE_WIDGET_ID,
+} from 'src/modules/opportunity/how-to-process/constants/how-to-process.constants';
+
+export default definePageLayout({
+ universalIdentifier: HOW_TO_PROCESS_PAGE_LAYOUT_ID,
+ name: 'How to process',
+ type: 'STANDALONE_PAGE',
+ tabs: [
+ {
+ universalIdentifier: HOW_TO_PROCESS_PAGE_TAB_ID,
+ title: 'How to process',
+ position: 0,
+ icon: 'IconListCheck',
+ layoutMode: PageLayoutTabLayoutMode.CANVAS,
+ widgets: [
+ {
+ universalIdentifier: HOW_TO_PROCESS_PAGE_WIDGET_ID,
+ title: 'How to process',
+ type: 'FRONT_COMPONENT',
+ configuration: {
+ configurationType: 'FRONT_COMPONENT',
+ frontComponentUniversalIdentifier: HOW_TO_PROCESS_FRONT_COMPONENT_ID,
+ },
+ },
+ ],
+ },
+ ],
+});
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/types/playbook-step.type.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/types/playbook-step.type.ts
new file mode 100644
index 00000000000..37bf111bb68
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/types/playbook-step.type.ts
@@ -0,0 +1,11 @@
+import { type PlaybookSkill } from 'src/modules/opportunity/how-to-process/constants/playbook-skills';
+
+export type PlaybookStep = {
+ num: string;
+ heading: string;
+ body: string;
+ bullets?: string[];
+ pills?: string[];
+ note?: string;
+ skills?: readonly PlaybookSkill[];
+};
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/playbook-nav.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/playbook-nav.test.ts
new file mode 100644
index 00000000000..b8e18ba7f79
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/playbook-nav.test.ts
@@ -0,0 +1,18 @@
+import { readFileSync } from 'node:fs';
+import { dirname, resolve } from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+import { describe, expect, it } from 'vitest';
+
+const PLAYBOOK_NAV_SOURCE = readFileSync(
+ resolve(dirname(fileURLToPath(import.meta.url)), './playbook-nav.ts'),
+ 'utf8',
+);
+
+describe('runPlaybookNav', () => {
+ it('does not open Apply from a standalone playbook page', () => {
+ expect(PLAYBOOK_NAV_SOURCE).not.toContain('APPLY_TO_BRIEF');
+ expect(PLAYBOOK_NAV_SOURCE).not.toContain('openSidePanelPage');
+ expect(PLAYBOOK_NAV_SOURCE).not.toMatch(/'apply'/);
+ });
+});
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/playbook-nav.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/playbook-nav.ts
new file mode 100644
index 00000000000..dbcf09d4c00
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/playbook-nav.ts
@@ -0,0 +1,34 @@
+import {
+ AppPath,
+ navigate,
+} from 'twenty-sdk/front-component';
+
+import { MY_APPLICATIONS_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/application/views/my-applications.view';
+import { OPEN_BRIEFS_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/opportunity/views/open-briefs.view';
+
+export type PlaybookNavAction = 'openBriefs' | 'myApplications';
+
+export type PlaybookLink =
+ | { label: string; href: string }
+ | { label: string; action: PlaybookNavAction };
+
+export const runPlaybookNav = async (action: PlaybookNavAction) => {
+ switch (action) {
+ case 'openBriefs': {
+ await navigate(
+ AppPath.RecordIndexPage,
+ { objectNamePlural: 'opportunities' },
+ { viewId: OPEN_BRIEFS_VIEW_UNIVERSAL_IDENTIFIER },
+ );
+ return;
+ }
+ case 'myApplications': {
+ await navigate(
+ AppPath.RecordIndexPage,
+ { objectNamePlural: 'applications' },
+ { viewId: MY_APPLICATIONS_VIEW_UNIVERSAL_IDENTIFIER },
+ );
+ return;
+ }
+ }
+};
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/split-playbook-marks.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/split-playbook-marks.test.ts
new file mode 100644
index 00000000000..7f4131f540c
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/split-playbook-marks.test.ts
@@ -0,0 +1,100 @@
+import { describe, expect, it } from 'vitest';
+
+import { PLAYBOOK_SKILL_LEAD_BRIEF } from 'src/modules/opportunity/how-to-process/constants/playbook-skills';
+import { splitPlaybookMarks } from 'src/modules/opportunity/how-to-process/utils/split-playbook-marks';
+
+describe('splitPlaybookMarks', () => {
+ it('wraps skill triggers as GitHub-linked code tokens with leftover text', () => {
+ const marks = splitPlaybookMarks('Run /twenty-lead-brief locally.', {
+ skills: [PLAYBOOK_SKILL_LEAD_BRIEF],
+ });
+
+ expect(marks).toEqual([
+ { kind: 'text', value: 'Run ' },
+ {
+ kind: 'skill',
+ value: '/twenty-lead-brief',
+ githubUrl: PLAYBOOK_SKILL_LEAD_BRIEF.githubUrl,
+ },
+ { kind: 'text', value: ' locally.' },
+ ]);
+ });
+
+ it('prefers the longer skill trigger over the skill name', () => {
+ const marks = splitPlaybookMarks(
+ 'twenty-lead-brief vs /twenty-lead-brief',
+ { skills: [PLAYBOOK_SKILL_LEAD_BRIEF] },
+ );
+
+ expect(marks).toEqual([
+ {
+ kind: 'skill',
+ value: 'twenty-lead-brief',
+ githubUrl: PLAYBOOK_SKILL_LEAD_BRIEF.githubUrl,
+ },
+ { kind: 'text', value: ' vs ' },
+ {
+ kind: 'skill',
+ value: '/twenty-lead-brief',
+ githubUrl: PLAYBOOK_SKILL_LEAD_BRIEF.githubUrl,
+ },
+ ]);
+ });
+
+ it('does not treat Applied as Apply', () => {
+ const marks = splitPlaybookMarks('lands as Applied.', {
+ links: [{ label: 'Apply', action: 'openBriefs' }],
+ });
+
+ expect(marks).toEqual([{ kind: 'text', value: 'lands as Applied.' }]);
+ });
+
+ it('links Open Briefs and My Applications labels', () => {
+ const openBriefs = {
+ label: 'Open Briefs',
+ action: 'openBriefs' as const,
+ };
+ const myApplications = {
+ label: 'My Applications',
+ action: 'myApplications' as const,
+ };
+
+ const marks = splitPlaybookMarks(
+ 'See Open Briefs and My Applications.',
+ { links: [openBriefs, myApplications] },
+ );
+
+ expect(marks).toEqual([
+ { kind: 'text', value: 'See ' },
+ { kind: 'link', value: 'Open Briefs', link: openBriefs },
+ { kind: 'text', value: ' and ' },
+ { kind: 'link', value: 'My Applications', link: myApplications },
+ { kind: 'text', value: '.' },
+ ]);
+ });
+
+ it('links href terms', () => {
+ const discord = {
+ label: 'Discord',
+ href: 'https://discord.com/channels/1130383047699738754/1513506376595538032',
+ };
+
+ expect(splitPlaybookMarks('Ping Discord after list.', { links: [discord] })).toEqual([
+ { kind: 'text', value: 'Ping ' },
+ { kind: 'link', value: 'Discord', link: discord },
+ { kind: 'text', value: ' after list.' },
+ ]);
+ });
+
+ it('returns a single text mark when there are no terms or no matches', () => {
+ expect(splitPlaybookMarks('')).toEqual([{ kind: 'text', value: '' }]);
+ expect(splitPlaybookMarks('nothing to mark')).toEqual([
+ { kind: 'text', value: 'nothing to mark' },
+ ]);
+ expect(
+ splitPlaybookMarks('nothing to mark', {
+ skills: [PLAYBOOK_SKILL_LEAD_BRIEF],
+ }),
+ ).toEqual([{ kind: 'text', value: 'nothing to mark' }]);
+ });
+});
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/split-playbook-marks.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/split-playbook-marks.ts
new file mode 100644
index 00000000000..b063c2a791f
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/split-playbook-marks.ts
@@ -0,0 +1,90 @@
+import { type PlaybookSkill } from 'src/modules/opportunity/how-to-process/constants/playbook-skills';
+import { type PlaybookLink } from 'src/modules/opportunity/how-to-process/utils/playbook-nav';
+
+export type PlaybookMark =
+ | { kind: 'text'; value: string }
+ | { kind: 'skill'; value: string; githubUrl: string }
+ | { kind: 'link'; value: string; link: PlaybookLink };
+
+type SplitPlaybookMarksOptions = {
+ links?: ReadonlyArray<PlaybookLink>;
+ skills?: ReadonlyArray<PlaybookSkill>;
+};
+
+const escapeRegExp = (value: string): string =>
+ value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
+
+export const splitPlaybookMarks = (
+ text: string,
+ options: SplitPlaybookMarksOptions = {},
+): PlaybookMark[] => {
+ const links = options.links ?? [];
+ const skills = options.skills ?? [];
+ const terms = [
+ ...skills.flatMap((skill) => [
+ {
+ kind: 'skill' as const,
+ value: skill.trigger,
+ githubUrl: skill.githubUrl,
+ },
+ {
+ kind: 'skill' as const,
+ value: skill.name,
+ githubUrl: skill.githubUrl,
+ },
+ ]),
+ ...links.map((link) => ({
+ kind: 'link' as const,
+ value: link.label,
+ link,
+ })),
+ ].sort((left, right) => right.value.length - left.value.length);
+
+ if (terms.length === 0) {
+ return [{ kind: 'text', value: text }];
+ }
+
+ const pattern = new RegExp(
+ `(${terms
+ .map((term) => {
+ const escaped = escapeRegExp(term.value);
+ return term.kind === 'link' ? `\\b${escaped}\\b` : escaped;
+ })
+ .join('|')})`,
+ 'g',
+ );
+
+ const marks: PlaybookMark[] = [];
+ let lastIndex = 0;
+
+ for (const match of text.matchAll(pattern)) {
+ const matched = match[1];
+ const index = match.index ?? 0;
+
+ if (index > lastIndex) {
+ marks.push({ kind: 'text', value: text.slice(lastIndex, index) });
+ }
+
+ const term = terms.find((candidate) => candidate.value === matched);
+
+ if (term?.kind === 'skill') {
+ marks.push({
+ kind: 'skill',
+ value: matched,
+ githubUrl: term.githubUrl,
+ });
+ } else if (term?.kind === 'link') {
+ marks.push({ kind: 'link', value: matched, link: term.link });
+ } else {
+ marks.push({ kind: 'text', value: matched });
+ }
+
+ lastIndex = index + matched.length;
+ }
+
+ if (lastIndex < text.length) {
+ marks.push({ kind: 'text', value: text.slice(lastIndex) });
+ }
+
+ return marks;
+};
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/my-deals.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/my-deals.navigation-menu-item.ts
index d8eb8371ea0..36a6b98323e 100644
--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/my-deals.navigation-menu-item.ts
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/my-deals.navigation-menu-item.ts
@@ -8,7 +8,7 @@ export default defineNavigationMenuItem({
universalIdentifier: '783d4920-6bf6-4dbf-b705-228ffcc9a7d7',
type: NavigationMenuItemType.VIEW,
icon: 'IconHandshake',
- position: 2,
+ position: 3,
folderUniversalIdentifier: PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER,
viewUniversalIdentifier: MY_DEALS_VIEW_UNIVERSAL_IDENTIFIER,
});
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/open-briefs.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/open-briefs.navigation-menu-item.ts
index 4348f010f03..b9042c02627 100644
--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/open-briefs.navigation-menu-item.ts
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/open-briefs.navigation-menu-item.ts
@@ -8,7 +8,7 @@ export default defineNavigationMenuItem({
universalIdentifier: '1392ad4d-3792-4187-a1c5-ee05815dcfde',
type: NavigationMenuItemType.VIEW,
icon: 'IconBuildingStore',
- position: 0,
+ position: 1,
folderUniversalIdentifier: PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER,
viewUniversalIdentifier: OPEN_BRIEFS_VIEW_UNIVERSAL_IDENTIFIER,
});
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/front-components/how-to-review.front-component.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/front-components/how-to-review.front-component.tsx
index e286565f627..12814fb64d9 100644
--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/front-components/how-to-review.front-component.tsx
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/front-components/how-to-review.front-component.tsx
@@ -5,7 +5,7 @@ import {
WELCOME_EMAIL_WORKFLOW_URL,
} from 'src/modules/partner/application-intake/constants/how-to-review.constants';
import { MARKETPLACE_RANKING } from 'src/modules/partner/application-intake/constants/marketplace-ranking.constant';
-import { PLAYBOOK_STYLES as styles } from 'src/modules/partner/application-intake/front-components/how-to-review/playbook-styles';
+import { PLAYBOOK_STYLES as styles } from 'src/modules/shared/front-components/playbook-styles';
import {
CASE_STUDY_BEATS_QUICK_FIELDS,
RANK_ROWS,
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/navigation-menu-items/how-to-review.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/navigation-menu-items/how-to-review.navigation-menu-item.ts
index 878a08348fa..1cbac6a3e9f 100644
--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/navigation-menu-items/how-to-review.navigation-menu-item.ts
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/navigation-menu-items/how-to-review.navigation-menu-item.ts
@@ -10,7 +10,7 @@ export default defineNavigationMenuItem({
name: 'How to review',
type: NavigationMenuItemType.PAGE_LAYOUT,
icon: 'IconListCheck',
- position: 10,
+ position: 11,
folderUniversalIdentifier: '0b2e499a-ae74-45e0-af08-243e19fc56aa',
pageLayoutUniversalIdentifier: HOW_TO_REVIEW_PAGE_LAYOUT_ID,
});
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/page-layouts/how-to-review.page-layout.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/page-layouts/how-to-review.page-layout.ts
index 146e02e4f35..9d2784749c9 100644
--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/page-layouts/how-to-review.page-layout.ts
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/page-layouts/how-to-review.page-layout.ts
@@ -23,7 +23,6 @@ export default definePageLayout({
universalIdentifier: HOW_TO_REVIEW_PAGE_WIDGET_ID,
title: 'How to review',
type: 'FRONT_COMPONENT',
- gridPosition: { row: 0, column: 0, rowSpan: 14, columnSpan: 12 },
configuration: {
configurationType: 'FRONT_COMPONENT',
frontComponentUniversalIdentifier: HOW_TO_REVIEW_FRONT_COMPONENT_ID,
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/navigation-menu-items/my-case-studies.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/navigation-menu-items/my-case-studies.navigation-menu-item.ts
index 7f6eed1afff..0cdf085cc65 100644
--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/navigation-menu-items/my-case-studies.navigation-menu-item.ts
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/navigation-menu-items/my-case-studies.navigation-menu-item.ts
@@ -10,7 +10,7 @@ export default defineNavigationMenuItem({
name: 'My Case Studies',
type: NavigationMenuItemType.PAGE_LAYOUT,
icon: 'IconBriefcase',
- position: 4,
+ position: 5,
folderUniversalIdentifier: PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER,
pageLayoutUniversalIdentifier: MY_CASE_STUDIES_PAGE_LAYOUT_ID,
});
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/navigation-menu-items/my-profile.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/navigation-menu-items/my-profile.navigation-menu-item.ts
index b2dc56b901a..76480c80428 100644
--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/navigation-menu-items/my-profile.navigation-menu-item.ts
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/navigation-menu-items/my-profile.navigation-menu-item.ts
@@ -12,7 +12,7 @@ export default defineNavigationMenuItem({
name: 'My Profile',
type: NavigationMenuItemType.PAGE_LAYOUT,
icon: 'IconUser',
- position: 3,
+ position: 4,
folderUniversalIdentifier: PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER,
pageLayoutUniversalIdentifier: MY_PROFILE_PAGE_LAYOUT_ID,
});
diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/front-components/playbook-styles.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/front-components/playbook-styles.ts
new file mode 100644
index 00000000000..f80fd656771
--- /dev/null
+++ b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/front-components/playbook-styles.ts
@@ -0,0 +1,221 @@
+import { COLORS, FONT } from 'src/modules/shared/front-components/palette';
+
+const MONO = '"Azeret Mono", ui-monospace, monospace';
+
+export const PLAYBOOK_STYLES = {
+ root: {
+ display: 'flex',
+ justifyContent: 'center',
+ width: '100%',
+ minHeight: 'calc(100dvh - 56px)',
+ boxSizing: 'border-box' as const,
+ padding: 32,
+ fontFamily: FONT,
+ color: COLORS.fg,
+ background: COLORS.bg,
+ },
+ article: {
+ width: '100%',
+ maxWidth: 720,
+ },
+ kicker: {
+ fontFamily: MONO,
+ fontSize: 11,
+ letterSpacing: 1.4,
+ textTransform: 'uppercase' as const,
+ color: COLORS.accent,
+ margin: '0 0 8px',
+ },
+ title: {
+ fontSize: 28,
+ fontWeight: 500,
+ letterSpacing: -0.4,
+ margin: '0 0 8px',
+ },
+ lede: {
+ color: COLORS.muted,
+ fontSize: 15,
+ lineHeight: '22px',
+ margin: '0 0 28px',
+ },
+ ledeWithLinks: {
+ color: COLORS.muted,
+ fontSize: 15,
+ lineHeight: '22px',
+ margin: '0 0 12px',
+ },
+ step: {
+ display: 'grid',
+ gridTemplateColumns: '36px 1fr',
+ gap: 16,
+ padding: '20px 0',
+ borderTop: `1px solid ${COLORS.border}`,
+ },
+ lastStep: {
+ display: 'grid',
+ gridTemplateColumns: '36px 1fr',
+ gap: 16,
+ padding: '20px 0',
+ borderTop: `1px solid ${COLORS.border}`,
+ borderBottom: `1px solid ${COLORS.border}`,
+ },
+ trust: {
+ display: 'grid',
+ gridTemplateColumns: '36px 1fr',
+ gap: 16,
+ padding: '20px 16px',
+ margin: '0 -16px',
+ borderTop: `1px solid ${COLORS.border}`,
+ background: COLORS.accentSoft,
+ },
+ num: {
+ fontFamily: MONO,
+ fontSize: 13,
+ color: COLORS.accent,
+ paddingTop: 2,
+ },
+ heading: {
+ fontSize: 16,
+ fontWeight: 500,
+ margin: '0 0 6px',
+ },
+ body: {
+ margin: 0,
+ color: COLORS.fg,
+ fontSize: 14,
+ lineHeight: '22px',
+ },
+ bodySpaced: {
+ margin: '8px 0 0',
+ color: COLORS.fg,
+ fontSize: 14,
+ lineHeight: '22px',
+ },
+ list: {
+ margin: '8px 0 0',
+ paddingLeft: 18,
+ color: COLORS.fg,
+ fontSize: 14,
+ lineHeight: '22px',
+ },
+ note: {
+ marginTop: 8,
+ color: COLORS.muted,
+ fontSize: 13,
+ lineHeight: '20px',
+ },
+ pillRow: {
+ display: 'flex',
+ flexWrap: 'wrap' as const,
+ gap: 8,
+ margin: '8px 0',
+ },
+ pill: {
+ display: 'inline-flex',
+ alignItems: 'center',
+ fontFamily: MONO,
+ fontSize: 11,
+ letterSpacing: 0.4,
+ textTransform: 'uppercase' as const,
+ padding: '4px 8px',
+ borderRadius: 2,
+ background: COLORS.surfaceAlt,
+ color: COLORS.muted,
+ },
+ table: {
+ width: '100%',
+ borderCollapse: 'collapse' as const,
+ marginTop: 12,
+ fontSize: 13,
+ },
+ th: {
+ fontFamily: MONO,
+ fontSize: 10,
+ letterSpacing: 1.2,
+ textTransform: 'uppercase' as const,
+ textAlign: 'left' as const,
+ color: COLORS.muted,
+ fontWeight: 500,
+ padding: '6px 0',
+ borderBottom: `1px solid ${COLORS.border}`,
+ },
+ thRight: {
+ fontFamily: MONO,
+ fontSize: 10,
+ letterSpacing: 1.2,
+ textTransform: 'uppercase' as const,
+ textAlign: 'right' as const,
+ color: COLORS.muted,
+ fontWeight: 500,
+ padding: '6px 0',
+ borderBottom: `1px solid ${COLORS.border}`,
+ },
+ td: {
+ padding: '8px 0',
+ borderBottom: `1px solid ${COLORS.border}`,
+ verticalAlign: 'top' as const,
+ lineHeight: '18px',
+ },
+ tdPoints: {
+ padding: '8px 0 8px 16px',
+ borderBottom: `1px solid ${COLORS.border}`,
+ verticalAlign: 'top' as const,
+ lineHeight: '18px',
+ fontFamily: MONO,
+ fontSize: 12,
+ whiteSpace: 'nowrap' as const,
+ textAlign: 'right' as const,
+ color: COLORS.accent,
+ },
+ link: {
+ color: COLORS.accent,
+ textDecoration: 'underline' as const,
+ },
+ linkButton: {
+ color: COLORS.accent,
+ textDecoration: 'underline' as const,
+ background: 'none',
+ border: 'none',
+ padding: 0,
+ margin: 0,
+ font: 'inherit',
+ cursor: 'pointer' as const,
+ },
+ headerLinkRow: {
+ display: 'flex',
+ flexWrap: 'wrap' as const,
+ gap: 16,
+ margin: '0 0 28px',
+ fontSize: 14,
+ },
+ code: {
+ fontFamily: MONO,
+ fontSize: 12,
+ padding: '1px 5px',
+ borderRadius: 2,
+ background: COLORS.surfaceAlt,
+ color: COLORS.accent,
+ },
+ skill: {
+ marginTop: 12,
+ padding: 12,
+ border: `1px solid ${COLORS.border}`,
+ borderRadius: 4,
+ background: COLORS.surface,
+ },
+ skillKicker: {
+ fontFamily: MONO,
+ fontSize: 10,
+ letterSpacing: 1.2,
+ textTransform: 'uppercase' as const,
+ color: COLORS.muted,
+ margin: '0 0 8px',
+ },
+ skillOutputs: {
+ margin: '8px 0 0',
+ paddingLeft: 18,
+ color: COLORS.fg,
+ fontSize: 13,
+ lineHeight: '20px',
+ },
+} as const;