Commit Graph

52 Commits

Author SHA1 Message Date
Асель
25c35fd6d0 Merge remote-tracking branch 'origin/main' into task/pep-154 2026-11-16 14:31:27 +05:00
Асель
3accfe155d Merge remote-tracking branch 'origin/main' into task/pep-154 2026-11-16 13:36:44 +05:00
Асель
2531e0ee7f PEP-140: foreign text put into the factory's messages is marked free text (titles, names, reviewer's and agent's words, outside reasons)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 13:30:48 +05:00
Асель
27e24c592b PEP-139: free text of people and agents is marked and never rewritten by the translation of rendered messages
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 13:30:41 +05:00
Асель
e4f21a9a29 PEP-138: AI roles' chat messages go through the dictionary; strict line translation keeps the model's own words
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 13:30:26 +05:00
Асель
c80a31f5cb PEP-154: фильтр служебного текста, ответ — только ввод человека, ошибки платформы — суперадмину
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 13:23:45 +05:00
Асель
4c0a08bef2 PEP-149: translations, help, agent rules, scenario tests
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 13:06:08 +05:00
Асель
45754f1f23 PEP-149: message types — end of turn is progress, ask_pm with options and default, report_blocker, no «continue» button
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 13:05:59 +05:00
Асель
4bf482d79a PEP-151: one state — one message (fingerprint, chat, Telegram edit, card)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 11:59:07 +05:00
Асель
2c396ff007 PEP-143: web form, «Обращения» page, Home card, translations, glossary, help
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 11:23:09 +05:00
Асель
fec0a698e7 PEP-143: feedback table, core, feedback agent tick, bot mode and buttons
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 11:23:09 +05:00
Асель
fe751fb008 Merge main into task/pep-98: PEP-108 voice input and PEP-127 carried-through accept through the dictionary
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 22:49:13 +05:00
Асель
a99e6abe6d Merge remote-tracking branch 'origin/task/pep-108' into task/pep-127 2026-11-15 22:17:14 +05:00
Асель
9052f3245f Merge main into task/pep-98: PEP-112…124 texts through the dictionary
Main's new wording (PEP-123 «Продакт» words) kept and wrapped in t()/m();
wording(mode, locale) gives English words for {task}/{runner} placeholders;
glossary check (pnpm lint) passes; English for all new keys (en/merge-*.ts).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 22:04:39 +05:00
Асель
f246813e35 PEP-127: мерж только со свежим main внутри — Peppa сама обновляет отставшую ветку и ждёт проверок; «Принять» запоминается и при идущих проверках
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-15 21:54:50 +05:00
Асель
027cd8b81a PEP-108: web dictation — microphone in story, comment, answer and chat fields via /api/transcribe
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 21:43:49 +05:00
Асель
2d4e8e6119 PEP-108: voice and text stories from the user's own bot, transcribe timeout, «в проекте X»
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 21:43:43 +05:00
Асель
fc97c41629 PEP-127: «принято, закроется само» в боте, MCP, на странице задачи и доске; AGENTS.md, память
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-15 21:40:14 +05:00
Асель
b478390eb5 PEP-123: messages to the user in the words of «Продакт» — chats, questions, Telegram, push
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-15 18:08:26 +05:00
Асель
23d6b6bee1 Merge main into task/pep-98: PEP-113 texts through the dictionary
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 17:43:05 +05:00
d3ae0642c6 Merge pull request 'PEP-113: сообщение суперадминам о новом пользователе' (#105) from task/pep-113 into main 2026-11-15 17:32:15 +05:00
Асель
ed62cdcd06 Merge main into task/pep-98: PEP-116/117 texts through the dictionary
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 17:25:06 +05:00
Асель
cd2b4d4342 PEP-113: superadmins get a message about every new account (eGov, Google, created by an admin)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-15 16:49:43 +05:00
Асель
a2c1f7354f Merge PEP-105 (#97) into task/pep-98
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 16:47:44 +05:00
Асель
222d9e1f74 Merge main into task/pep-98: PEP-109 texts through the dictionary
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 16:47:00 +05:00
Асель
81eab53459 PEP-117: chats a product manager understands — an overview of what waits and where to write, events in plain words
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-15 16:34:39 +05:00
Асель
f9a4b3c56e PEP-109: a chat's Telegram group is linked through the user's own bot
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-15 16:01:10 +05:00
Асель
96b5422a56 PEP-105: «Peppa FACTORY» instead of «Пеппа» in Russian UI texts; i18n-check guards Russian keys; archive change, memory
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 15:56:55 +05:00
Асель
905aeb912d Merge main into task/pep-98: PEP-106 discussion texts through the dictionary
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 15:36:29 +05:00
Асель
6f1cec5bc1 PEP-106: project discussion — a plain chat of the project's people, with unread counts and notifications
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-15 15:12:02 +05:00
Асель
1f16286dca PEP-98: English for web, bot, notifications and runner messages; product name «Peppa FACTORY» everywhere
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:47:50 +05:00
Асель
355c5b19b2 PEP-98: i18n core — dictionaries, localizeText, user locale, web provider, bot and push localization, i18n-check
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:25:03 +05:00
Асель
6e54fc69a6 PEP-91: Peppa reports its own errors to Bugsink — backend to PEP-api, browser to PEP-web
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 12:39:46 +05:00
Асель
01d58973ab PEP-85: every user's own Telegram bot — token from BotFather, polled and answered through it
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 22:57:07 +05:00
Асель
7c721db744 Merge main into task/pep-60: keep both sides (chats, shared pool, platform channel)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 19:52:53 +05:00
Асель
82c003e209 PEP-60: platform Telegram channel — check, releases, outages/restarts, platform digest
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 19:21:04 +05:00
Асель
46840ffef5 PEP-62: bot — link groups by code, mirror chat messages with reply threads, replies and buttons from groups
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 19:10:49 +05:00
Асель
acf2bb9623 PEP-21/28: runner service (command queue in the watchdog), watchdog 2.0 auto-recovery and escalation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 07:34:09 +05:00
Асель
14916079bc PEP-5/43/47/48: usage and limits, story budgets, factory metrics, audit journal
- PEP-5: statusLine hook (cost, context, 5h/7d limit windows), transcript tokens,
  sessions.usage, usage strip over every page, runner usage, bot /status, MCP get_usage
- PEP-43: project/story budgets in settings, watchdog pause (Escape, question to the PM:
  extend x2 / remove limit / stop), start/resume guard, budget on the story card
- PEP-47: project metrics tab (cycle time, first pass, review returns, questions, runner
  hours, PM wait, limits, spend by week/agent/epic), MCP get_metrics
- PEP-48: event authors (actor columns, AsyncLocalStorage context), question_answered,
  /journal for superadmins, project journal tab, authors in the story feed
- Migration 0007_usage_audit; OpenSpec changes archived

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 06:52:13 +05:00
Асель
db822a570c PEP-45: stories from a Telegram message (text or voice); docs; archive PEP-44/45/46 changes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 06:07:18 +05:00
Асель
ea4bdf38ff PEP-29/35/55: notification prefs and routing, Web Push outbox, daily digest; mock-push, tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 05:10:20 +05:00
Асель
358fb5c0e9 PEP-66: «стори» and «эпики» in web, bot, notifications, MCP texts, help; tab tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 03:28:42 +05:00
Асель
03aee432fb PEP-18: separate Peppa prod — release dir, PM button, DB backup, auto-rollback
- scripts/peppa-release.sh: ~/peppa/{repo.git,releases/<sha>,current,shared/.env};
  install → next build → checked DB backup → migrate → switch current → kickstart →
  health (/api/health commit + fresh heartbeats) → rollback; --queue, --check, --no-restart
- runner/platform-release.ts: deployProd for the platform project (PEPPA_PLATFORM_KEY=PEP)
  queues a request for launchd quest.telecom.peppa.release; offer after green main
- CLI: peppa db backup [file], peppa release report; backupDb verifies the copy
- install-launchd.sh: wait for unload after bootout (no "Bootstrap failed: 5"),
  release agent (QueueDirectories), PEPPA_ROOT in agents
- bin wrappers: logical root so hooks/credential.helper point at ~/peppa/current
- mock-launchctl, mock-pnpm; e2e platform-release.test.ts; OpenSpec pep-18-peppa-prod

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 17:58:34 +05:00
Асель
3a282b8054 PEP-36 stage 2: SQLite (node:sqlite, WAL) instead of Postgres
- packages/db: schema on sqlite-core (timestamps as epoch ms → Date, JSON as text,
  booleans 0/1), one baseline migration; node:sqlite client under drizzle's
  better-sqlite3 session (busy_timeout first, WAL, BEGIN IMMEDIATE, retries on
  SQLITE_BUSY, lazy open, async transaction callbacks refused); PEPPA_DB
  (default ~/.peppa/peppa.db)
- live updates: notify() pokes the bot over a unix socket; the bot also watches
  PRAGMA data_version every second (writes by other processes)
- Postgres specifics ported: createTask transaction is synchronous, no
  `for update skip locked`, `count(*)`, json_extract instead of ->>, json_each
  instead of @>
- `peppa db migrate` and `peppa db migrate-to-sqlite <file>` (read-only
  snapshot of Postgres, FK order from the schema, row count + foreign key
  checks, file appears only when they pass); old Postgres schema kept in
  packages/cli/legacy-pg-migrations for the migration and its test
- daily VACUUM INTO backup from the watchdog (7 copies, admin alert on failure)
- tests: a temp SQLite file per test file; storage.test.ts (20 processes,
  per-project numbering across processes, socket/data_version, migration from
  Postgres incl. a dangling foreign key, backups); two test races fixed
- CI: no per-run Postgres database; PEPPA_TEST_PG only for the migration test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 17:23:24 +05:00
Асель
8dc82859c7 PEP-36 stage 1: run Peppa with Node 26 type stripping instead of tsx
- tsconfig: erasableSyntaxOnly + verbatimModuleSyntax; parameter properties
  rewritten (BugsinkError, GiteaError, GiteaClient, OAuthError, TelegramError,
  TelegramApi, MockGitea)
- bin wrappers (peppa, peppa-mcp, peppa-hook, peppa-bot, testkit mocks,
  peppa-dev): `node --import scripts/lib/require-node.mjs` (clear error on
  Node < 26, PEPPA_NODE overrides the binary); package scripts and tests on
  `node` / `node --test`; tsx removed
- install-launchd.sh pins PEPPA_NODE (checked absolute path) in the plists
- fix a race the faster hooks exposed: the prompt hook answered every pending
  question, including a PM question raised after Peppa itself pasted text
  into the terminal; sendToSession now logs `input_sent` and the hook only
  answers questions older than that input
- change pep-36-lightweight-stack: stage 1 done, hook start numbers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 16:51:22 +05:00
Асель
59c3b583de PEP-57: CD — deploy workflow, preview/staging/prod, health check and rollback, releases
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 14:49:24 +05:00
Асель
498013472f PEP-58: Bugsink — production errors become Peppa incidents and tasks
- infra: Bugsink 2.6.3 in docker (infra/bugsink, scripts/bugsink-up.sh), database
  bugsink in Peppa's Postgres, Traefik route bugsink.telecom.quest
- packages/bugsink: REST API client + custom-webhook payload parsing
- incidents (migration 0011): incident_settings, error_sources, incidents; ingest from
  webhook POST /api/hooks/bugsink/<secret> and a 2-minute poll in the watchdog
- incident policy per project: notify / backlog (default) / start / ask (Telegram
  buttons) / triage (claude -p with the owner's token, falls back to ask)
- daily task cap, environments, ignore pattern; manual "fixed" until PEP-57;
  REGRESSED returns the task to the backlog
- web «Ошибки» section, bot buttons, MCP tools for agents and the PM, help, RULES.md
- testkit: mock-bugsink, mock-triage, incidents.test.ts (one test per scenario,
  plus a live run against the real Bugsink with PEPPA_LIVE_BUGSINK=1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 14:31:32 +05:00
Асель
1085474c78 PEP-20: service monitoring — health, heartbeats, alerts to platform admins
- web/bot/watchdog heartbeats in settings (heartbeat:<service>)
- watchdog checks bot+web, bot checks watchdog+web; quiet > 5 min → Telegram alert
  to platform admins via outbox (platform.admins, default allowlist), recovery message,
  hourly reminder, 15 min cooldown, deterministic dedupe; watchdog sends directly
  when the bot is down
- GET /api/health (DB, version, services; 503 without DB)
- peppa status, peppa platform admins
- OpenSpec change pep-20-monitoring (archived), e2e monitor.test.ts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 14:06:54 +05:00
Асель
824ba56b74 PEP-2: Telegram per user — pairing from Settings, delivery by project access
- users.telegram_* replace the single global binding; one-time /start code
  per user (web Settings → Telegram, or peppa telegram pair <login>);
  a chat belongs to one user
- agent questions go to the project's owner and members who paired; an
  answer (button or reply) is accepted only from someone with access to
  the project; messages are closed for every recipient; /status is scoped
- CLI: telegram pair|status|unpair <login>, user ensure mock-<name>;
  dev stand pairs its test PM per user
- tests: several-users journey (bob without access, then as a member);
  70 e2e total, green
- BREAKING: the old global binding is removed; users pair again in Settings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 03:44:30 +05:00
Асель
00c8f79a36 PEP-7: autonomous mode — board moves start agents, PM only for stoppers
- web board (Backlog / In progress / Review / Done) with drag-and-drop and
  buttons; moveTask starts an agent on In progress, stops on Backlog/Done
- routine proposals go straight to apply; request_approval/ask_pm only for
  architectural stoppers (RULES.md, MCP hints, template pushed to Gitea)
- Stop hook keeps the agent going (decision: block, max 2 in a row,
  sessions.auto_nudges reset by a human answer) instead of pinging the PM
- review: ready-for-review message with Accept (acceptTask → done, session
  stopped) in Telegram and web; a text reply goes back to the agent
- mock-claude honours Stop-hook block; 6 new e2e tests (48 total, green)
- OpenSpec: pep-7 archived (task-autonomy, web-workspace board)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 21:21:11 +05:00