type: agent name: PM Agent (Project Manager) slug: pm-agent kind: subagent department: it reports_to: it-director manages: [scout-agent, threads-news-editor] status: active version: v0.4 readiness_pct: 80 implementation: systemd-timer runtime: python + gemini-api model: gemini-3.1-pro-preview trigger: cron schedule: "0 19 * * *" source_dir: /srv/services/pm-agent skills:
Автономний project-manager що тримає документацію живою. Щодоби (22:00 Kyiv = 19:00 UTC) автоматично:
sparc_detector → детермінований readiness_pctsparc/ папки (генерує 01-specification.md)last_updated, append ## 🤖 PM Changelog → ### YYYY-MM-DD секцію/srv/services/pm-agent/answers/_templates/sparc/sparc_state.json)gemini-sandbox.key (model gemini-3.1-pro-preview)/root/.claude/projects/-/*.jsonl, /srv/wiki/, /srv/projects/*/.gitWhy Gemini: AI Ultra subscription покриває use, $0 incremental cost, 1M context перекриває читання багатьох сесій + wiki за один pass.
| Trigger | Schedule | Запускає |
|---|---|---|
| systemd timer | pm-agent.timer daily 19:00 UTC (22:00 Kyiv) |
systemd auto |
| On-demand | manual | Сергій або Claude через python3 /srv/services/pm-agent/pm_agent.py |
| Dry-run (тестовий) | manual | python3 pm_agent.py --dry-run --hours 1 (Telegram skip, друк у stdout) |
| No-bootstrap (тестовий) | manual | python3 pm_agent.py --dry-run --no-bootstrap (тільки detection, не модифікує файли) |
--hours <N> lookback на сесії (default 24)
--dry-run не шле Telegram digest, друкує у stdout
--no-bootstrap не виконує SPARC bootstrap (тільки detection)
| Project / Area | R | A | C | I |
|---|---|---|---|---|
All projects/deltamedical/* |
✓ | |||
All projects/personal/* |
✓ | |||
products/, integrations/, agents/ |
✓ |
Status: ✅ active v0.4 (з 2026-05-10)
Code:
/srv/services/pm-agent/pm_agent.py — main script (834 рядки)/srv/services/pm-agent/sparc_detector.py — phase detection + readiness + bootstrap (252 рядки)/srv/services/pm-agent/drift_detector.py — окремий drift checker (відмінний сервіс)Backups:
/srv/services/pm-agent/pm_agent.py.bak-v0.1-2026-05-02/srv/services/pm-agent/pm_agent.py.bak-v0.3-2026-05-10Config / state:
/srv/services/pm-agent/sparc_state.json — snapshot фаз для transition detection/srv/services/pm-agent/answers/ — Сергієві voice/text відповіді на open-questions/srv/services/pm-agent/answers/processed/ — архів проче́таних answersDeployment:
pm-agent.timer → service pm-agent.service/usr/bin/python3 /srv/services/pm-agent/pm_agent.pysystemctl status pm-agent.timerLogs: /var/log/pm-agent.log
Credentials: /srv/passepartout/google/gemini-sandbox.key
Кожен PM run проходить через sparc_detector.run_sparc_lifecycle():
Для кожного проекту:
detect_sparc_phase(<project_dir>) → стан фазbootstrap_needed=True → bootstrap_sparc() створює sparc/01-specification.mdcompute_readiness(detected) → точне число (= completed_phases / N × 100)detect_phase_transitions() порівнює з sparc_state.json:
Окремий git commit для SPARC-змін з префіксом «🌱 PM Agent v0.4»
legacy_baseline: true у 01-specification.md frontmatter → readiness НЕ міняється формулою (для umbrella'ів у production)phase: bootstrap (status у файлі) → readiness НЕ міняється поки Сергій не переведе у review/approved--no-bootstrap flag → не створювати нові sparc/ папки📋 PM Daily YYYY-MM-DD (v0.4)
[summary 1-2 речення]
🌱 SPARC bootstrap: <list проектів> # тільки якщо було
📊 Readiness updates (по SPARC-фазах): # тільки якщо було
• <slug>: X% → Y% (фаза: P)
🎯 SPARC переходи фаз: # тільки якщо було
• <slug>: S→P 🚪 # 🚪 = потрібен gate review
🟢 Активні проекти:
• <slug> — що зроблено за 24h
✅ PM-агент задокументував:
• <slug>: last_updated→YYYY-MM-DD, changelog +N ряд.
💾 git commit зроблено
🟡 Stale (>7д):
• <slug> — Nд. <suggestion>
❓ Питання для Сергія:
• <q1>
• <q2>
➡️ PM next: <one sentence>
{single agent — не crew}
sparc_state.json і answers/ — НЕ у git (локальний state, не у /srv/wiki)