From 262dbccbbee24a19a265042cec178f7a09291e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=81=D0=B5=D0=BB=D1=8C?= Date: Mon, 16 Nov 2026 09:04:45 +0500 Subject: [PATCH 1/2] PEP-135, PEP-136: step-by-step guide to connect Peppa FACTORY to one's own Claude or ChatGPT; language switcher in the menu on every page Co-Authored-By: Claude Fable 5.2 --- apps/web/app/(app)/help/connect/page.tsx | 68 ++++++ apps/web/app/(app)/help/page.tsx | 7 +- apps/web/app/(app)/settings/page.tsx | 14 +- apps/web/components/CopyText.tsx | 28 +++ apps/web/components/Sidebar.tsx | 5 +- .../changes/pep-135-connect-guide/proposal.md | 13 + .../specs/web-workspace/spec.md | 23 ++ .../changes/pep-135-connect-guide/tasks.md | 6 + packages/core/src/connect-texts.ts | 223 ++++++++++++++++++ packages/core/src/index.ts | 1 + packages/testkit/test/connect-help.test.ts | 60 +++++ 11 files changed, 440 insertions(+), 8 deletions(-) create mode 100644 apps/web/app/(app)/help/connect/page.tsx create mode 100644 apps/web/components/CopyText.tsx create mode 100644 openspec/changes/pep-135-connect-guide/proposal.md create mode 100644 openspec/changes/pep-135-connect-guide/specs/web-workspace/spec.md create mode 100644 openspec/changes/pep-135-connect-guide/tasks.md create mode 100644 packages/core/src/connect-texts.ts create mode 100644 packages/testkit/test/connect-help.test.ts diff --git a/apps/web/app/(app)/help/connect/page.tsx b/apps/web/app/(app)/help/connect/page.tsx new file mode 100644 index 00000000..2e690ae0 --- /dev/null +++ b/apps/web/app/(app)/help/connect/page.tsx @@ -0,0 +1,68 @@ +import Link from "next/link"; +import { CONNECT_HELP } from "@peppa/core"; +import { PageHeader } from "@/components/common"; +import { CopyText } from "@/components/CopyText"; +import { Workspace } from "@/components/Workspace"; +import { publicOrigin } from "@/lib/auth"; +import { getLocale } from "@/lib/i18n"; + +/** PEP-135: how to connect Peppa FACTORY to one's own Claude or ChatGPT — step by step; texts live in core/connect-texts.ts. */ +export default async function ConnectHelp() { + const t = CONNECT_HELP[await getLocale()] ?? CONNECT_HELP.ru; + const address = `${await publicOrigin()}/mcp`; + const card = "flex flex-col gap-2 rounded-lg border bg-card px-4 py-3"; + const h2 = "m-0 text-[15px] font-semibold"; + return ( + +
+ {t.back}} title={t.title}> + {t.lead} + +
+
+

{t.addressTitle}

+ +

{t.addressNote}

+
+ {t.apps.map((app) => ( +
+

{app.title}

+

{app.need}

+
    + {app.steps.map((s) => ( +
  1. {s}
  2. + ))} +
+
+ ))} +
+

{t.askTitle}

+

{t.askLead}

+
    + {t.asks.map((a) => ( +
  • {a}
  • + ))} +
+
+
+

{t.troubleTitle}

+
+ {t.troubles.map((x) => ( +
+
{x.q}
+
{x.a}
+
+ ))} +
+
+
+

{t.offTitle}

+

{t.off}

+ {t.offLink} +
+
+

{t.other}

+
+
+ ); +} diff --git a/apps/web/app/(app)/help/page.tsx b/apps/web/app/(app)/help/page.tsx index 1ea3580a..30661920 100644 --- a/apps/web/app/(app)/help/page.tsx +++ b/apps/web/app/(app)/help/page.tsx @@ -1,6 +1,6 @@ import Link from "next/link"; import type { ReactNode } from "react"; -import { PRODUCT_HELP } from "@peppa/core"; +import { CONNECT_HELP, PRODUCT_HELP } from "@peppa/core"; import { m } from "@peppa/shared/i18n"; import { getLocale, getT } from "@/lib/i18n"; import { publicOrigin, uiMode } from "@/lib/auth"; @@ -78,6 +78,7 @@ function rich(s: string): ReactNode { /** PEP-122: «Помощь» for the «Продакт» view — one screen, three answers; texts live in core/help-texts.ts. */ async function ProductHelp() { const t = PRODUCT_HELP[await getLocale()] ?? PRODUCT_HELP.ru; + const connect = CONNECT_HELP[await getLocale()] ?? CONNECT_HELP.ru; return (
@@ -99,6 +100,10 @@ async function ProductHelp() { ))}

{t.question}

+

+ {connect.linkFromHelp}{" "} + {connect.linkLabel} +

{t.more}{" "} {t.moreLink} diff --git a/apps/web/app/(app)/settings/page.tsx b/apps/web/app/(app)/settings/page.tsx index 5b638d20..34eccac8 100644 --- a/apps/web/app/(app)/settings/page.tsx +++ b/apps/web/app/(app)/settings/page.tsx @@ -1,4 +1,4 @@ -import { googleEnabled, connectedApps, getNotifyPrefs, isLocalUser, isSuperadmin, listUserProjects, maskIin, NOTIFY_EVENT_NAMES, NOTIFY_EVENTS, userPushSubscriptions, vapidPublicKey } from "@peppa/core"; +import { CONNECT_HELP, googleEnabled, connectedApps, getNotifyPrefs, isLocalUser, isSuperadmin, listUserProjects, maskIin, NOTIFY_EVENT_NAMES, NOTIFY_EVENTS, userPushSubscriptions, vapidPublicKey } from "@peppa/core"; import { Hidden } from "@/components/cards"; import { ago, Disclosure, Empty, Flash, Notice, PageHeader, Section } from "@/components/common"; import { Button } from "@/components/ui/button"; @@ -15,7 +15,8 @@ import { unlinkGoogleAction, disconnectOwnBotAction, revokeConnectedApp, saveNot import { PushNotifications } from "@/components/PushNotifications"; import { TimezoneField } from "@/components/TimezoneField"; import { LanguageSwitcher } from "@/components/I18n"; -import { getT } from "@/lib/i18n"; +import { getLocale, getT } from "@/lib/i18n"; +import { CopyText } from "@/components/CopyText"; import { intlLocale } from "@peppa/shared/i18n"; const back = { back: "/settings" }; @@ -48,6 +49,7 @@ export default async function Settings({ searchParams }: { searchParams: Promise const pushSubs = await userPushSubscriptions(db, user.id); const vapid = await vapidPublicKey(db); const t = await getT(); + const connect = CONNECT_HELP[await getLocale()] ?? CONNECT_HELP.ru; const ownBotSteps = ; return ( @@ -301,12 +303,12 @@ export default async function Settings({ searchParams }: { searchParams: Promise

{w.engineer ? t("Адрес сервера — подключите его как MCP-коннектор с авторизацией OAuth. Клиент зарегистрируется сам, вы подтвердите доступ на экране Peppa FACTORY.") : t("Подключите Peppa FACTORY к своему чату — и ставьте задачи и отвечайте агентам прямо из него. Понадобится этот адрес; доступ вы подтвердите на экране Peppa FACTORY.")}

- {origin}/mcp -

- {t("Как подключить и что спрашивать — в")} {t("Помощи")}. + +

+ {connect.linkLabel} →

-
+
{apps.length === 0 ? ( {t("Нет подключённых приложений.")} ) : ( diff --git a/apps/web/components/CopyText.tsx b/apps/web/components/CopyText.tsx new file mode 100644 index 00000000..63bd3774 --- /dev/null +++ b/apps/web/components/CopyText.tsx @@ -0,0 +1,28 @@ +"use client"; + +import { useState } from "react"; +import { Check, Copy } from "lucide-react"; + +/** PEP-135: a value the person pastes elsewhere (an address), in full, with a copy button. */ +export function CopyText({ value, label, done }: { value: string; label: string; done: string }) { + const [copied, setCopied] = useState(false); + async function copy() { + try { + await navigator.clipboard.writeText(value); + setCopied(true); + setTimeout(() => setCopied(false), 2500); + } catch { + /* no clipboard access: the text is selectable, the person copies it by hand */ + } + } + return ( + + + {value} + + + + ); +} diff --git a/apps/web/components/Sidebar.tsx b/apps/web/components/Sidebar.tsx index 18a2091d..616dcbc4 100644 --- a/apps/web/components/Sidebar.tsx +++ b/apps/web/components/Sidebar.tsx @@ -5,6 +5,7 @@ import { usePathname } from "next/navigation"; import { Bot, Contact, FolderKanban, Megaphone, House, KeyRound, MessagesSquare, ScrollText, LifeBuoy, LogOut, Search, Server, Settings, ShieldCheck, Sparkles, Users, type LucideIcon } from "lucide-react"; import { Brand } from "@/components/Brand"; import { ThemeToggle } from "@/components/ThemeToggle"; +import { LanguageSwitcher } from "@/components/I18n"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; import { useT } from "@/components/I18n"; @@ -95,7 +96,9 @@ export function Sidebar({ login, avatarUrl, counts, superadmin = false, engineer ); })} -
+
+ {/* PEP-136: the language is one click away on every page, not only in «Настройки». */} +
{avatarUrl && } {login} diff --git a/openspec/changes/pep-135-connect-guide/proposal.md b/openspec/changes/pep-135-connect-guide/proposal.md new file mode 100644 index 00000000..7665e35e --- /dev/null +++ b/openspec/changes/pep-135-connect-guide/proposal.md @@ -0,0 +1,13 @@ +# Proposal: PEP-135 / PEP-136 — инструкция подключения к своему чату и выбор языка в меню + +## Why +- Продакту негде прочитать, как подключить Peppa FACTORY к своему Claude или ChatGPT: в виде «Продакт» «Помощь» про это молчит, в «Настройках» — только адрес и ссылка на «Помощь» (PEP-135). +- Переключатель языка есть только на странице входа и в «Настройках»: на Главной его нет (PEP-136). + +## What Changes +- Страница `/help/connect` «Peppa FACTORY в вашем Claude или ChatGPT»: адрес с кнопкой «Скопировать адрес», шаги по экранам для Claude и ChatGPT, что написать в чате, что делать, если не получилось, как отключить. Тексты — `core/connect-texts.ts`, три языка, слова из словаря. +- «Настройки»: адрес с кнопкой копирования и ссылка «Как подключить — по шагам»; раздел «Подключённые приложения» получает якорь `#apps`. «Помощь» вида «Продакт» — ссылка на инструкцию. +- Меню (`Sidebar`): переключатель языка на каждой странице. + +## Impact +- Веб: `help/connect/page.tsx`, `components/CopyText.tsx`, `settings/page.tsx`, `help/page.tsx`, `components/Sidebar.tsx`; core: `connect-texts.ts`; тест `connect-help.test.ts`. Миграций нет. diff --git a/openspec/changes/pep-135-connect-guide/specs/web-workspace/spec.md b/openspec/changes/pep-135-connect-guide/specs/web-workspace/spec.md new file mode 100644 index 00000000..02cd9cd7 --- /dev/null +++ b/openspec/changes/pep-135-connect-guide/specs/web-workspace/spec.md @@ -0,0 +1,23 @@ +## ADDED Requirements + +### Requirement: Инструкция подключения к своему чату +Веб SHALL показывать на странице `/help/connect` пошаговую инструкцию, как подключить Peppa FACTORY к своему Claude или ChatGPT: адрес подключения с кнопкой копирования, шаги для каждого приложения, примеры запросов и способ отключить — на языке интерфейса и словами из словаря. + +#### Scenario: Продакт открывает инструкцию +- **GIVEN** пользователь в виде «Продакт» +- **WHEN** он открывает «Помощь» и переходит по ссылке «Как подключить — по шагам» +- **THEN** он видит адрес подключения с кнопкой «Скопировать адрес» +- **AND** шаги для Claude и для ChatGPT, заканчивающиеся кнопкой «Разрешить» +- **AND** примеры того, что написать в чате, и как отключить в «Подключённых приложениях» + +#### Scenario: Ссылка из Настроек +- **WHEN** пользователь открывает «Настройки» +- **THEN** рядом с адресом подключения есть кнопка копирования и ссылка на инструкцию + +### Requirement: Выбор языка в меню +Веб SHALL показывать переключатель языка интерфейса в меню на каждой странице после входа. + +#### Scenario: Язык на Главной +- **WHEN** пользователь открывает Главную +- **THEN** в меню есть переключатель RU / KZ / EN +- **AND** выбор другого языка сразу меняет язык страницы и сохраняется diff --git a/openspec/changes/pep-135-connect-guide/tasks.md b/openspec/changes/pep-135-connect-guide/tasks.md new file mode 100644 index 00000000..c6470e09 --- /dev/null +++ b/openspec/changes/pep-135-connect-guide/tasks.md @@ -0,0 +1,6 @@ +# Tasks: PEP-135 / PEP-136 + +- [x] 1.1 тексты инструкции на трёх языках (`core/connect-texts.ts`), тест `connect-help.test.ts` +- [x] 1.2 страница `/help/connect`, кнопка копирования, ссылки из «Настроек» и «Помощи» +- [x] 1.3 переключатель языка в меню +- [x] 1.4 проверка в браузере на копии базы diff --git a/packages/core/src/connect-texts.ts b/packages/core/src/connect-texts.ts new file mode 100644 index 00000000..157a28d9 --- /dev/null +++ b/packages/core/src/connect-texts.ts @@ -0,0 +1,223 @@ +// PEP-135: texts of the guide «Peppa FACTORY в вашем Claude или ChatGPT» (/help/connect) — +// how a product person connects Peppa FACTORY to their own chat. A translation file: no logic, +// every language has the same shape. Russian words come from docs/glossary.md (the test +// connect-help.test.ts checks them against its «Нельзя» column). Menu names of Claude and +// ChatGPT stay in English: that is how the person sees them on those sites. + +export interface ConnectApp { + /** Short id for anchors: claude, chatgpt. */ + id: string; + title: string; + /** What the person needs before they start (plan, where the menu is). */ + need: string; + steps: string[]; +} + +export interface ConnectHelpText { + title: string; + lead: string; + addressTitle: string; + addressNote: string; + copy: string; + copied: string; + apps: [ConnectApp, ConnectApp]; + askTitle: string; + askLead: string; + asks: string[]; + troubleTitle: string; + troubles: Array<{ q: string; a: string }>; + offTitle: string; + off: string; + offLink: string; + other: string; + /** Link texts on «Помощь» and in «Настройки». */ + linkFromHelp: string; + linkLabel: string; + back: string; +} + +export const CONNECT_LANGS = ["ru", "kk", "en"] as const; +export type ConnectLang = (typeof CONNECT_LANGS)[number]; + +export const CONNECT_HELP: Record = { + ru: { + title: "Peppa FACTORY в вашем Claude или ChatGPT", + lead: "Подключите Peppa FACTORY к своему чату — и ставьте задачи, отвечайте агентам и принимайте результат, не открывая сайт. Подключение занимает пару минут, программировать не нужно.", + addressTitle: "Адрес для подключения", + addressNote: "Этот адрес вы вставите в настройках своего чата. Он одинаковый для всех — доступ к вашим проектам появится только после того, как вы сами войдёте и нажмёте «Разрешить».", + copy: "Скопировать адрес", + copied: "Скопировано", + apps: [ + { + id: "claude", + title: "Claude", + need: "Подойдёт сайт claude.ai или приложение Claude. На бесплатном тарифе Claude такой возможности может не быть.", + steps: [ + "Скопируйте адрес выше.", + "В Claude нажмите на своё имя внизу слева и откройте «Settings» → «Connectors».", + "Нажмите «Add custom connector». В поле «Name» напишите Peppa FACTORY, в поле с адресом вставьте скопированный адрес и нажмите «Add».", + "Рядом с новой строкой Peppa FACTORY нажмите «Connect». Откроется страница Peppa FACTORY — войдите так же, как обычно входите на сайт.", + "Страница покажет, что Claude просит доступ к Peppa FACTORY, — нажмите «Разрешить». Вас вернёт в Claude — подключение готово.", + "В новом чате нажмите значок настроек под полем ввода и проверьте, что Peppa FACTORY включена.", + ], + }, + { + id: "chatgpt", + title: "ChatGPT", + need: "Подойдёт сайт chatgpt.com. Нужен платный тариф ChatGPT: на бесплатном своих подключений нет.", + steps: [ + "Скопируйте адрес выше.", + "В ChatGPT нажмите на своё имя внизу слева и откройте «Settings» → «Apps & Connectors».", + "Внизу страницы откройте «Advanced settings» и включите «Developer mode». Без этого кнопки для своего подключения не будет.", + "Вернитесь в «Apps & Connectors» и нажмите «Create». В поле «Name» напишите Peppa FACTORY, в поле «MCP Server URL» вставьте скопированный адрес, в списке «Authentication» оставьте «OAuth», поставьте галочку «I trust this application» и нажмите «Create».", // glossary-ignore: «OAuth» — дословное название пункта в ChatGPT + "Откроется страница Peppa FACTORY — войдите так же, как обычно входите на сайт, и нажмите «Разрешить».", + "В новом чате нажмите «+» рядом с полем ввода, откройте «More» и выберите Peppa FACTORY.", + ], + }, + ], + askTitle: "Что написать в чате", + askLead: "Пишите обычными словами — чат сам обратится к Peppa FACTORY. Первый раз он может спросить разрешение на действие: разрешите.", + asks: [ + "Покажи мои проекты в Peppa FACTORY", + "Что сейчас ждёт моего ответа?", + "В проекте SHOP создай задачу: на главной странице нужна кнопка «Заказать звонок»", + "Что с задачей SHOP-3?", + "Прими задачу SHOP-3", + "Верни SHOP-3 на доработку: кнопка должна быть зелёной", + ], + troubleTitle: "Если не получилось", + troubles: [ + { q: "Нет пункта «Connectors» или кнопки «Create»", a: "Скорее всего, на вашем тарифе Claude или ChatGPT нет своих подключений, а в ChatGPT ещё не включён «Developer mode». В рабочем аккаунте компании подключения может разрешать только её администратор." }, + { q: "Страница Peppa FACTORY просит войти", a: "Это нормально: войдите тем же способом, что и на сайт. Чат не узнаёт ваш способ входа — он получает только разрешение, которое вы дали." }, + { q: "Чат отвечает, что не видит Peppa FACTORY", a: "Проверьте, что подключение включено именно в этом чате (шаг 6), и начните новый чат." }, + { q: "Чат не видит нужный проект", a: "Чат видит те же проекты, что и вы на сайте. Попросите владельца проекта добавить вас в участники." }, + ], + offTitle: "Как отключить", + off: "Откройте «Настройки» → «Подключённые приложения» и нажмите «Отозвать» рядом с приложением. Чат сразу потеряет доступ; подключить заново можно в любой момент.", + offLink: "Открыть «Подключённые приложения»", + other: "Пользуетесь другим приложением? Подойдёт любое, где можно добавить своё подключение по адресу: вставьте адрес выше, войдите и нажмите «Разрешить».", + linkFromHelp: "Хотите ставить задачи прямо из своего Claude или ChatGPT?", + linkLabel: "Как подключить — по шагам", + back: "Помощь", + }, + kk: { + title: "Peppa FACTORY сіздің Claude немесе ChatGPT ішінде", + lead: "Peppa FACTORY-ді өз чатыңызға қосыңыз — сайтты ашпай-ақ тапсырма қойып, агенттерге жауап беріп, нәтижені қабылдай аласыз. Қосу бірнеше минут алады, бағдарламалаудың қажеті жоқ.", + addressTitle: "Қосылу мекенжайы", + addressNote: "Бұл мекенжайды чатыңыздың баптауларына қоясыз. Ол бәріне бірдей — жобаларыңызға қолжетімділік тек өзіңіз кіріп, «Рұқсат беру» түймесін басқаннан кейін пайда болады.", + copy: "Мекенжайды көшіру", + copied: "Көшірілді", + apps: [ + { + id: "claude", + title: "Claude", + need: "claude.ai сайты немесе Claude қолданбасы жарайды. Claude-тың тегін тарифінде бұл мүмкіндік болмауы мүмкін.", + steps: [ + "Жоғарыдағы мекенжайды көшіріңіз.", + "Claude-та сол жақ төмендегі атыңызды басып, «Settings» → «Connectors» бөлімін ашыңыз.", + "«Add custom connector» түймесін басыңыз. «Name» өрісіне Peppa FACTORY деп жазыңыз, мекенжай өрісіне көшірілген мекенжайды қойып, «Add» түймесін басыңыз.", + "Жаңа Peppa FACTORY жолының жанындағы «Connect» түймесін басыңыз. Peppa FACTORY беті ашылады — сайтқа әдетте қалай кірсеңіз, солай кіріңіз.", + "Бетте Claude-тың Peppa FACTORY-ге қолжетімділік сұрап тұрғаны көрсетіледі — «Рұқсат беру» түймесін басыңыз. Сіз Claude-қа қайтасыз — қосылу дайын.", + "Жаңа чатта енгізу өрісінің астындағы баптаулар белгішесін басып, Peppa FACTORY қосулы екенін тексеріңіз.", + ], + }, + { + id: "chatgpt", + title: "ChatGPT", + need: "chatgpt.com сайты жарайды. ChatGPT-тің ақылы тарифі керек: тегін тарифте өз қосылымдарыңызды қосу мүмкін емес.", + steps: [ + "Жоғарыдағы мекенжайды көшіріңіз.", + "ChatGPT-те сол жақ төмендегі атыңызды басып, «Settings» → «Apps & Connectors» бөлімін ашыңыз.", + "Беттің төменгі жағындағы «Advanced settings» бөлімін ашып, «Developer mode» қосыңыз. Онсыз өз қосылымыңызды жасайтын түйме шықпайды.", + "«Apps & Connectors» бөліміне қайтып, «Create» түймесін басыңыз. «Name» өрісіне Peppa FACTORY деп жазыңыз, «MCP Server URL» өрісіне көшірілген мекенжайды қойыңыз, «Authentication» тізімінде «OAuth» қалдырыңыз, «I trust this application» белгісін қойып, «Create» түймесін басыңыз.", + "Peppa FACTORY беті ашылады — сайтқа әдетте қалай кірсеңіз, солай кіріп, «Рұқсат беру» түймесін басыңыз.", + "Жаңа чатта енгізу өрісінің жанындағы «+» белгісін басып, «More» бөлімін ашыңыз да, Peppa FACTORY таңдаңыз.", + ], + }, + ], + askTitle: "Чатқа не жазу керек", + askLead: "Қарапайым сөзбен жазыңыз — чат Peppa FACTORY-ге өзі жүгінеді. Алғашқы рет ол әрекетке рұқсат сұрауы мүмкін: рұқсат беріңіз.", + asks: [ + "Peppa FACTORY-дегі жобаларымды көрсет", + "Қазір менің жауабымды не күтіп тұр?", + "SHOP жобасында тапсырма жаса: басты бетке «Қоңырауға тапсырыс беру» түймесі керек", + "SHOP-3 тапсырмасы қалай?", + "SHOP-3 тапсырмасын қабылда", + "SHOP-3 тапсырмасын түзетуге қайтар: түйме жасыл болуы керек", + ], + troubleTitle: "Егер болмаса", + troubles: [ + { q: "«Connectors» бөлімі немесе «Create» түймесі жоқ", a: "Сірә, Claude немесе ChatGPT тарифіңізде өз қосылымдарыңызды қосу мүмкіндігі жоқ, ал ChatGPT-те «Developer mode» әлі қосылмаған. Компанияның жұмыс аккаунтында қосылымдарға тек оның әкімшісі рұқсат бере алады." }, + { q: "Peppa FACTORY беті кіруді сұрайды", a: "Бұл қалыпты: сайтқа қалай кірсеңіз, солай кіріңіз. Чат сіздің кіру тәсіліңізді білмейді — ол тек сіз берген рұқсатты алады." }, + { q: "Чат Peppa FACTORY-ді көрмеймін дейді", a: "Қосылым дәл осы чатта қосулы екенін тексеріңіз (6-қадам) және жаңа чат бастаңыз." }, + { q: "Чат қажетті жобаны көрмейді", a: "Чат сіз сайтта көретін жобаларды ғана көреді. Жоба иесінен сізді қатысушы етіп қосуын сұраңыз." }, + ], + offTitle: "Қалай ажырату керек", + off: "«Баптаулар» → «Қосылған қолданбалар» бөлімін ашып, қолданбаның жанындағы «Қайтарып алу» түймесін басыңыз. Чат қолжетімділіктен бірден айырылады; кез келген уақытта қайта қосуға болады.", + offLink: "«Қосылған қолданбалар» бөлімін ашу", + other: "Басқа қолданбаны пайдаланасыз ба? Мекенжай арқылы өз қосылымын қосуға болатын кез келгені жарайды: жоғарыдағы мекенжайды қойып, кіріңіз де «Рұқсат беру» түймесін басыңыз.", + linkFromHelp: "Тапсырмаларды өз Claude немесе ChatGPT чатыңыздан қойғыңыз келе ме?", + linkLabel: "Қалай қосу керек — қадамдап", + back: "Анықтама", + }, + en: { + title: "Peppa FACTORY in your Claude or ChatGPT", + lead: "Connect Peppa FACTORY to your own chat — then create tasks, answer agents and accept results without opening the site. It takes a couple of minutes and needs no programming.", + addressTitle: "Address to connect", + addressNote: "You paste this address into your chat's settings. It is the same for everyone — access to your projects appears only after you sign in yourself and press “Allow”.", + copy: "Copy the address", + copied: "Copied", + apps: [ + { + id: "claude", + title: "Claude", + need: "Use the claude.ai site or the Claude app. The free Claude plan may not offer this.", + steps: [ + "Copy the address above.", + "In Claude, click your name at the bottom left and open “Settings” → “Connectors”.", + "Press “Add custom connector”. Type Peppa FACTORY in “Name”, paste the copied address into the address field and press “Add”.", + "Press “Connect” next to the new Peppa FACTORY row. A Peppa FACTORY page opens — sign in the way you usually sign in to the site.", + "The page shows that Claude asks for access to Peppa FACTORY — press “Allow”. You are taken back to Claude — the connection is ready.", + "In a new chat, press the settings icon under the message box and check that Peppa FACTORY is switched on.", + ], + }, + { + id: "chatgpt", + title: "ChatGPT", + need: "Use the chatgpt.com site. A paid ChatGPT plan is required: the free plan has no connections of your own.", + steps: [ + "Copy the address above.", + "In ChatGPT, click your name at the bottom left and open “Settings” → “Apps & Connectors”.", + "At the bottom of the page open “Advanced settings” and switch on “Developer mode”. Without it there is no button for a connection of your own.", + "Go back to “Apps & Connectors” and press “Create”. Type Peppa FACTORY in “Name”, paste the copied address into “MCP Server URL”, leave “OAuth” in “Authentication”, tick “I trust this application” and press “Create”.", + "A Peppa FACTORY page opens — sign in the way you usually sign in to the site and press “Allow”.", + "In a new chat, press “+” next to the message box, open “More” and choose Peppa FACTORY.", + ], + }, + ], + askTitle: "What to write in the chat", + askLead: "Write in plain words — the chat turns to Peppa FACTORY by itself. The first time it may ask permission for an action: allow it.", + asks: [ + "Show my projects in Peppa FACTORY", + "What is waiting for my answer right now?", + "In project SHOP create a task: the home page needs a “Request a call” button", + "How is task SHOP-3 going?", + "Accept task SHOP-3", + "Send SHOP-3 back for changes: the button must be green", + ], + troubleTitle: "If it did not work", + troubles: [ + { q: "There is no “Connectors” item or no “Create” button", a: "Most likely your Claude or ChatGPT plan has no connections of your own, or “Developer mode” is not switched on in ChatGPT yet. In a company account only its administrator may allow connections." }, + { q: "The Peppa FACTORY page asks me to sign in", a: "That is expected: sign in the same way you do on the site. The chat never learns how you sign in — it only receives the permission you gave." }, + { q: "The chat says it cannot see Peppa FACTORY", a: "Check that the connection is switched on in this very chat (step 6) and start a new chat." }, + { q: "The chat cannot see the project I need", a: "The chat sees the same projects you see on the site. Ask the project owner to add you as a member." }, + ], + offTitle: "How to disconnect", + off: "Open “Settings” → “Connected apps” and press “Revoke” next to the app. The chat loses access at once; you can connect again at any time.", + offLink: "Open “Connected apps”", + other: "Using another app? Any app that lets you add a connection of your own by address will do: paste the address above, sign in and press “Allow”.", + linkFromHelp: "Want to create tasks right from your Claude or ChatGPT?", + linkLabel: "How to connect — step by step", + back: "Help", + }, +}; diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 143c3074..8a2e000a 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -29,6 +29,7 @@ export * from "./intake.ts"; export * from "./analyst-chat.ts"; export * from "./ui-mode.ts"; export * from "./help-texts.ts"; +export * from "./connect-texts.ts"; export * from "./story-product.ts"; export * from "./product.ts"; export * from "./story-refine.ts"; diff --git a/packages/testkit/test/connect-help.test.ts b/packages/testkit/test/connect-help.test.ts new file mode 100644 index 00000000..97bb2efe --- /dev/null +++ b/packages/testkit/test/connect-help.test.ts @@ -0,0 +1,60 @@ +// PEP-135: the guide «Peppa FACTORY в вашем Claude или ChatGPT» — three languages, glossary words only. +import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; +import { describe, test } from "node:test"; +import { CONNECT_HELP, CONNECT_LANGS, type ConnectHelpText } from "@peppa/core"; + +const strings = (t: ConnectHelpText) => [ + t.title, t.lead, t.addressTitle, t.addressNote, t.copy, t.copied, t.askTitle, t.askLead, ...t.asks, t.troubleTitle, + ...t.troubles.flatMap((x) => [x.q, x.a]), t.offTitle, t.off, t.offLink, t.other, t.linkFromHelp, t.linkLabel, t.back, + ...t.apps.flatMap((a) => [a.title, a.need, ...a.steps]), +]; + +/** «Нельзя» column of docs/glossary.md. */ +function forbidden(): string[] { + const rows = readFileSync(new URL("../../../docs/glossary.md", import.meta.url), "utf8") + .split("\n") + .filter((l) => l.startsWith("|") && !l.startsWith("|---") && !l.startsWith("| Понятие")); + return rows.flatMap((r) => r.split("|")[3]!.split(",").map((w) => w.trim()).filter(Boolean)); +} + +describe("PEP-135: инструкция подключения к своему чату", () => { + test("Продакт открывает инструкцию: шаги для Claude и ChatGPT, что написать, как отключить", () => { + const t = CONNECT_HELP.ru; + assert.deepEqual(t.apps.map((a) => a.id), ["claude", "chatgpt"]); + for (const a of t.apps) { + assert.ok(a.steps.length >= 5, a.id); + assert.match(a.steps.join(" "), /«Разрешить»/, `${a.id}: the consent button is named`); + } + assert.ok(t.asks.length >= 4); + assert.match(t.off, /«Подключённые приложения»/); + assert.match(t.off, /«Отозвать»/); + }); + + test("тексты есть на русском, казахском и английском, одной формы и без пустых строк", () => { + assert.deepEqual([...CONNECT_LANGS], ["ru", "kk", "en"]); + for (const lang of CONNECT_LANGS) { + const t = CONNECT_HELP[lang]; + assert.deepEqual(t.apps.map((a) => a.id), ["claude", "chatgpt"], lang); + t.apps.forEach((a, i) => assert.equal(a.steps.length, CONNECT_HELP.ru.apps[i]!.steps.length, `${lang}: steps of ${a.id}`)); + assert.equal(t.asks.length, CONNECT_HELP.ru.asks.length, lang); + assert.equal(t.troubles.length, CONNECT_HELP.ru.troubles.length, lang); + for (const s of strings(t)) assert.ok(s.trim().length > 0, lang); + assert.ok(strings(t).every((s) => !/Пеппа|Пеппы/.test(s)), `${lang}: the product name stays «Peppa FACTORY»`); + } + assert.notDeepEqual(strings(CONNECT_HELP.kk), strings(CONNECT_HELP.ru)); + assert.notDeepEqual(strings(CONNECT_HELP.en), strings(CONNECT_HELP.ru)); + }); + + test("Слова из словаря: в русском тексте нет слов из колонки «Нельзя»", () => { + const words = forbidden(); + assert.ok(words.includes("стори") && words.includes("токен"), "the glossary is parsed"); + // Allowed: the product name, and «OAuth» as the literal name of a ChatGPT menu item. + const text = strings(CONNECT_HELP.ru).join("\n").replaceAll("Peppa FACTORY", "").replaceAll("оставьте «OAuth»", ""); + for (const w of words) { + const esc = w.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); + const re = /^[\p{L}\p{N} ]+$/u.test(w) ? new RegExp(`(? Date: Mon, 16 Nov 2026 09:19:58 +0500 Subject: [PATCH 2/2] PEP-135: archive the change, project memory, glossary baseline Co-Authored-By: Claude Fable 5.2 --- .peppa/memory.md | 1 + docs/glossary-baseline.json | 63 ++++++++----------- .../proposal.md | 0 .../specs/web-workspace/spec.md | 0 .../tasks.md | 0 openspec/specs/web-workspace/spec.md | 22 +++++++ 6 files changed, 49 insertions(+), 37 deletions(-) rename openspec/changes/{pep-135-connect-guide => archive/2026-11-16-pep-135-connect-guide}/proposal.md (100%) rename openspec/changes/{pep-135-connect-guide => archive/2026-11-16-pep-135-connect-guide}/specs/web-workspace/spec.md (100%) rename openspec/changes/{pep-135-connect-guide => archive/2026-11-16-pep-135-connect-guide}/tasks.md (100%) diff --git a/.peppa/memory.md b/.peppa/memory.md index 8a8b43aa..1413b9f2 100644 --- a/.peppa/memory.md +++ b/.peppa/memory.md @@ -34,3 +34,4 @@ - Группы чатов (PEP-109) — через свой бот пользователя: `chats.tg_bot_user_id` (null — общий, только суперадмин); исходящие в группу — по chat_id через `ownByChat`. - Новый пользователь (PEP-113): `announceNewUser` внутри функций создания учётки; новое событие в NOTIFY_EVENTS — строка в PUSH_TITLE бота и скрытые поля настроек для не-админа. - Комментарий к стори в бэклоге (PEP-115) разбирает аналитик в тике (`storyRefineTick`, курсор `refine.task:`, `PEPPA_STORY_REFINE=off`); новая роль модели = ветка в `mock-intake`. +- Инструкция подключения к своему Claude/ChatGPT (PEP-135): `/help/connect`, тексты — `core/connect-texts.ts` (`CONNECT_HELP` ru/kk/en одной формы, тест `connect-help.test.ts`); изменились экраны подключения или инструменты удалённого MCP — править её; копирование — ``. diff --git a/docs/glossary-baseline.json b/docs/glossary-baseline.json index 3a50329f..a9dc39f5 100644 --- a/docs/glossary-baseline.json +++ b/docs/glossary-baseline.json @@ -1,57 +1,46 @@ { - "apps/bot/src/bot.ts": {"proposal": 1, "Пеппа": 4, "команда": 1, "прод": 1, "раннер": 1, "релиз": 1, "сессия": 9, "стори": 8, "твоим": 1, "тебя": 4}, - "apps/bot/src/render.ts": {"релиз": 1, "сессия": 2, "терминал": 1}, - "apps/web/app/(app)/actions.ts": {"Gitea": 3, "Пеппа": 3, "репозиторий": 2, "стори": 3}, - "apps/web/app/(app)/board-actions.ts": {"стори": 3}, - "apps/web/app/(app)/chats/[chat]/page.tsx": {"Пеппа": 1, "команда": 4, "релиз": 2, "стори": 10, "твоих": 1}, - "apps/web/app/(app)/chats/actions.ts": {"Пеппа": 1}, - "apps/web/app/(app)/chats/page.tsx": {"релиз": 1}, - "apps/web/app/(app)/help/page.tsx": {"Bugsink": 1, "CI": 1, "Gitea": 14, "OAuth": 2, "OpenSpec": 6, "PR": 20, "Peppa": 10, "backlog": 2, "change": 3, "deploy": 6, "git": 2, "issue": 3, "opus": 3, "preview": 1, "sonnet": 4, "staging": 7, "tmux": 3, "Пеппа": 25, "ветка": 3, "выкатить": 4, "выкатка": 1, "деплой": 3, "дифф": 2, "инциденты": 2, "команда": 10, "коммит": 2, "контекст": 6, "лог": 1, "мерж": 5, "модель": 7, "провайдер": 4, "прод": 12, "пул": 16, "раннер": 45, "релиз": 9, "репо": 1, "репозиторий": 16, "сессия": 8, "спека": 2, "стенд": 1, "стоимость": 3, "стори": 110, "твоих": 1, "тебя": 1, "терминал": 10, "токен": 6, "ты": 2, "усилия": 2, "хук": 1}, - "apps/web/app/(app)/hosts/page.tsx": {"Peppa": 3, "git": 1, "runner": 1, "tmux": 3, "Пеппа": 6, "раннер": 8, "хук": 1}, - "apps/web/app/(app)/journal/page.tsx": {"Пеппа": 1, "терминал": 1, "хук": 1}, - "apps/web/app/(app)/p/[key]/page.tsx": {"CI": 1, "Gitea": 6, "PR": 1, "Peppa": 2, "deploy": 1, "sonnet": 1, "Пеппа": 1, "выкатить": 1, "деплой": 1, "дифф": 2, "модель": 1, "прод": 2, "пул": 7, "раннер": 2, "релиз": 2, "репозиторий": 6, "сессия": 4, "спека": 1, "стори": 13, "терминал": 2, "токен": 5}, - "apps/web/app/(app)/p/[key]/plan/[epic]/page.tsx": {"пул": 1, "сессия": 1, "стори": 11}, - "apps/web/app/(app)/p/[key]/tabs.tsx": {"Gitea": 3, "OpenSpec": 3, "PR": 7, "Peppa": 1, "change": 2, "Пеппа": 3, "ветка": 4, "команда": 3, "коммит": 3, "лог": 1, "раннер": 1, "репозиторий": 3, "спека": 2, "стори": 14}, - "apps/web/app/(app)/page.tsx": {"твоего": 1, "тебя": 1}, - "apps/web/app/(app)/platform/page.tsx": {"Пеппа": 4}, + "apps/bot/src/bot.ts": {"команда": 1}, + "apps/bot/src/render.ts": {"терминал": 1}, + "apps/web/app/(app)/actions.ts": {"Gitea": 3, "репозиторий": 2}, + "apps/web/app/(app)/chats/[chat]/page.tsx": {"команда": 4}, + "apps/web/app/(app)/help/page.tsx": {"Bugsink": 1, "CI": 1, "Gitea": 14, "OAuth": 2, "OpenSpec": 6, "PR": 20, "Peppa": 10, "backlog": 2, "change": 3, "deploy": 6, "git": 2, "issue": 3, "opus": 3, "preview": 1, "sonnet": 4, "staging": 7, "tmux": 3, "ветка": 3, "выкатить": 4, "выкатка": 1, "деплой": 3, "дифф": 2, "инциденты": 2, "команда": 10, "коммит": 2, "контекст": 6, "лог": 1, "мерж": 5, "модель": 7, "провайдер": 4, "прод": 12, "пул": 16, "раннер": 45, "релиз": 9, "репо": 1, "репозиторий": 16, "сессия": 8, "спека": 2, "стенд": 1, "стоимость": 3, "стори": 110, "терминал": 10, "токен": 6, "усилия": 2, "хук": 1}, + "apps/web/app/(app)/hosts/page.tsx": {"Peppa": 3, "git": 1, "runner": 1, "tmux": 3, "раннер": 8, "хук": 1}, + "apps/web/app/(app)/journal/page.tsx": {"терминал": 1, "хук": 1}, + "apps/web/app/(app)/p/[key]/page.tsx": {"CI": 1, "Gitea": 6, "PR": 1, "Peppa": 2, "deploy": 1, "sonnet": 1, "выкатить": 1, "деплой": 1, "дифф": 2, "модель": 1, "прод": 2, "пул": 7, "раннер": 2, "релиз": 2, "репозиторий": 6, "сессия": 4, "спека": 1, "стори": 4, "терминал": 2, "токен": 5}, + "apps/web/app/(app)/p/[key]/plan/[epic]/page.tsx": {"пул": 1, "сессия": 1}, + "apps/web/app/(app)/p/[key]/tabs.tsx": {"Gitea": 3, "OpenSpec": 3, "PR": 7, "Peppa": 1, "change": 2, "ветка": 4, "команда": 3, "коммит": 3, "лог": 1, "раннер": 1, "репозиторий": 3, "спека": 2, "стори": 4}, "apps/web/app/(app)/projects/new/page.tsx": {"Gitea": 2, "репозиторий": 1}, "apps/web/app/(app)/projects/page.tsx": {"PR": 1, "прод": 1, "релиз": 1, "стори": 1}, - "apps/web/app/(app)/runners/page.tsx": {"tmux": 2, "раннер": 4, "стори": 3, "твоих": 1, "тебя": 2, "терминал": 3}, - "apps/web/app/(app)/secrets/page.tsx": {"Gitea": 2, "OAuth": 2, "Пеппа": 1, "пул": 1, "сессия": 1, "токен": 6}, - "apps/web/app/(app)/settings/page.tsx": {"Gitea": 1, "OAuth": 1, "PR": 1, "Peppa": 1, "Пеппа": 7, "команда": 1, "пул": 2, "раннер": 1, "стори": 1}, + "apps/web/app/(app)/runners/page.tsx": {"tmux": 2, "раннер": 4, "стори": 3, "терминал": 3}, + "apps/web/app/(app)/secrets/page.tsx": {"Gitea": 2, "OAuth": 2, "пул": 1, "сессия": 1, "токен": 6}, + "apps/web/app/(app)/settings/page.tsx": {"Gitea": 1, "OAuth": 1, "PR": 1, "Peppa": 1, "команда": 1, "пул": 2, "раннер": 1}, "apps/web/app/(app)/subscriptions/actions.ts": {"провайдер": 1}, - "apps/web/app/(app)/subscriptions/page.tsx": {"API-ключ": 4, "провайдер": 2, "пул": 17, "раннер": 1, "сессия": 1, "токен": 4}, + "apps/web/app/(app)/subscriptions/page.tsx": {"API-ключ": 3, "провайдер": 2, "пул": 17, "раннер": 1, "сессия": 1, "токен": 3}, "apps/web/app/(app)/t/[key]/page.tsx": {"PR": 1, "change": 1, "пул": 4, "сессия": 2, "стори": 7}, - "apps/web/app/(app)/t/[key]/tabs.tsx": {"Gitea": 3, "PR": 4, "Peppa": 1, "change": 1, "ветка": 2, "дифф": 1, "коммит": 2, "лог": 1, "мерж": 2, "раннер": 2, "сессия": 2, "смержить": 1, "стори": 5, "терминал": 1}, + "apps/web/app/(app)/t/[key]/tabs.tsx": {"Gitea": 3, "PR": 4, "Peppa": 1, "change": 1, "ветка": 2, "дифф": 1, "коммит": 2, "лог": 1, "мерж": 2, "раннер": 2, "сессия": 2, "смержить": 1, "стори": 4, "терминал": 1}, "apps/web/app/(app)/team/actions.ts": {"команда": 1}, - "apps/web/app/(app)/team/page.tsx": {"Пеппа": 2, "дифф": 1, "команда": 7, "стори": 3}, + "apps/web/app/(app)/team/page.tsx": {"дифф": 1, "команда": 7}, "apps/web/app/(app)/users/page.tsx": {"Gitea": 1, "пул": 1, "сессия": 1}, - "apps/web/app/(app)/welcome/page.tsx": {"команда": 1, "репозиторий": 1, "стенд": 1, "стори": 7}, + "apps/web/app/(app)/welcome/page.tsx": {"команда": 1, "стори": 1}, "apps/web/app/api/runners/[id]/terminal/route.ts": {"терминал": 1}, "apps/web/app/login/page.tsx": {"команда": 1}, - "apps/web/app/manifest.ts": {"стори": 1}, - "apps/web/app/oauth/authorize/page.tsx": {"Пеппа": 1, "стори": 2}, "apps/web/components/Accounting.tsx": {"$": 1, "контекст": 1, "раннер": 3, "сессия": 3, "стоимость": 6, "стори": 10, "токен": 5}, - "apps/web/components/ActivityAside.tsx": {"тебя": 1}, "apps/web/components/AgentModel.tsx": {"opus": 1, "sonnet": 1, "коммит": 1, "модель": 6, "провайдер": 6, "пул": 1, "раннер": 1, "стори": 2, "усилия": 3}, "apps/web/components/AgentSteps.tsx": {"команда": 1, "терминал": 1, "хук": 1}, - "apps/web/components/Autonomy.tsx": {"Gitea": 1, "PR": 2, "deploy": 1, "Пеппа": 2, "мерж": 2, "стори": 7}, + "apps/web/components/Autonomy.tsx": {"Gitea": 1, "PR": 2, "deploy": 1, "мерж": 2, "стори": 6}, "apps/web/components/Board.tsx": {"стори": 2}, "apps/web/components/Brand.tsx": {"Peppa": 1}, "apps/web/components/CommandPalette.tsx": {"раннер": 1, "стори": 1}, - "apps/web/components/Incidents.tsx": {"Bugsink": 5, "Sentry": 2, "production": 1, "Пеппа": 1, "деплой": 1, "инциденты": 2, "прод": 2, "релиз": 1, "стори": 4}, + "apps/web/components/Incidents.tsx": {"Bugsink": 5, "Sentry": 2, "production": 1, "деплой": 1, "инциденты": 2, "прод": 2, "релиз": 1, "стори": 4}, "apps/web/components/Onboarding.tsx": {"команда": 1}, - "apps/web/components/OwnBotSteps.tsx": {"Пеппа": 2, "команда": 1, "токен": 7}, + "apps/web/components/OwnBotSteps.tsx": {"команда": 1, "токен": 7}, "apps/web/components/PoolSubscriptions.tsx": {"пул": 1}, - "apps/web/components/ProductCard.tsx": {"Пеппа": 1, "релиз": 1, "стори": 4}, - "apps/web/components/ProgressOverview.tsx": {"стори": 4}, - "apps/web/components/ProjectSecrets.tsx": {"Пеппа": 1, "сессия": 1, "терминал": 1}, - "apps/web/components/PugMascot.tsx": {"Пеппа": 2, "твоего": 2, "тебя": 1}, + "apps/web/components/ProductCard.tsx": {"релиз": 1}, + "apps/web/components/ProjectSecrets.tsx": {"сессия": 1, "терминал": 1}, "apps/web/components/ReviewPreview.tsx": {"Gitea": 1, "PR": 1, "issue": 1, "деплой": 1, "дифф": 1, "стенд": 1}, - "apps/web/components/RunnerConsole.tsx": {"Пеппа": 1, "пул": 1, "сессия": 1, "стори": 2, "терминал": 2}, - "apps/web/components/RunnerTerminal.tsx": {"tmux": 1, "Пеппа": 1, "сессия": 2, "терминал": 2}, - "apps/web/components/Runners.tsx": {"tmux": 1, "Пеппа": 3, "ветка": 1, "контекст": 1, "пул": 2, "раннер": 12, "стори": 15, "терминал": 2, "токен": 1, "ты": 1}, - "apps/web/components/Sidebar.tsx": {"Пеппа": 1, "команда": 2}, - "apps/web/components/SubscriptionSetup.tsx": {"Пеппа": 1, "токен": 1}, + "apps/web/components/RunnerConsole.tsx": {"пул": 1, "сессия": 1, "стори": 2, "терминал": 2}, + "apps/web/components/RunnerTerminal.tsx": {"tmux": 1, "сессия": 2, "терминал": 2}, + "apps/web/components/Runners.tsx": {"tmux": 1, "ветка": 1, "контекст": 1, "пул": 2, "раннер": 12, "стори": 15, "терминал": 2, "токен": 1}, + "apps/web/components/Sidebar.tsx": {"команда": 2}, "apps/web/components/cards.tsx": {"tmux": 1, "терминал": 3} } diff --git a/openspec/changes/pep-135-connect-guide/proposal.md b/openspec/changes/archive/2026-11-16-pep-135-connect-guide/proposal.md similarity index 100% rename from openspec/changes/pep-135-connect-guide/proposal.md rename to openspec/changes/archive/2026-11-16-pep-135-connect-guide/proposal.md diff --git a/openspec/changes/pep-135-connect-guide/specs/web-workspace/spec.md b/openspec/changes/archive/2026-11-16-pep-135-connect-guide/specs/web-workspace/spec.md similarity index 100% rename from openspec/changes/pep-135-connect-guide/specs/web-workspace/spec.md rename to openspec/changes/archive/2026-11-16-pep-135-connect-guide/specs/web-workspace/spec.md diff --git a/openspec/changes/pep-135-connect-guide/tasks.md b/openspec/changes/archive/2026-11-16-pep-135-connect-guide/tasks.md similarity index 100% rename from openspec/changes/pep-135-connect-guide/tasks.md rename to openspec/changes/archive/2026-11-16-pep-135-connect-guide/tasks.md diff --git a/openspec/specs/web-workspace/spec.md b/openspec/specs/web-workspace/spec.md index 38931250..b3878b56 100644 --- a/openspec/specs/web-workspace/spec.md +++ b/openspec/specs/web-workspace/spec.md @@ -532,3 +532,25 @@ PM SHALL уметь убрать стори в архив и вернуть её - **GIVEN** `PEPPA_TRANSCRIBE_URL` задан, а сервис остановлен - **WHEN** пользователь записал голос и нажал «Стоп» - **THEN** под кнопкой видно «сервис расшифровки недоступен…», текст в поле не меняется + +### Requirement: Инструкция подключения к своему чату +Веб SHALL показывать на странице `/help/connect` пошаговую инструкцию, как подключить Peppa FACTORY к своему Claude или ChatGPT: адрес подключения с кнопкой копирования, шаги для каждого приложения, примеры запросов и способ отключить — на языке интерфейса и словами из словаря. + +#### Scenario: Продакт открывает инструкцию +- **GIVEN** пользователь в виде «Продакт» +- **WHEN** он открывает «Помощь» и переходит по ссылке «Как подключить — по шагам» +- **THEN** он видит адрес подключения с кнопкой «Скопировать адрес» +- **AND** шаги для Claude и для ChatGPT, заканчивающиеся кнопкой «Разрешить» +- **AND** примеры того, что написать в чате, и как отключить в «Подключённых приложениях» + +#### Scenario: Ссылка из Настроек +- **WHEN** пользователь открывает «Настройки» +- **THEN** рядом с адресом подключения есть кнопка копирования и ссылка на инструкцию + +### Requirement: Выбор языка в меню +Веб SHALL показывать переключатель языка интерфейса в меню на каждой странице после входа. + +#### Scenario: Язык на Главной +- **WHEN** пользователь открывает Главную +- **THEN** в меню есть переключатель RU / KZ / EN +- **AND** выбор другого языка сразу меняет язык страницы и сохраняется