Phase 3: Chat Integration (Telegram) #19
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Phase 3 enables natural language interaction via chat protocols.
Architecture
Components
PM Agent Hierarchy
pm-agent- Generic 1-way/1-door agentpm-agent-{repo-name}- Extends base PM for specific repo (optional scaling)Session Naming
pm-agent(kugetsu session)issue-{n}sessions (kugetsu)Context Management
Storage
Fetch Triggers
Context Merge
Message Routing
Flow
PM Agent Decisions
Output Layer
PM Notification
Implementation Plan
Phase 3a: Hermes Chat Agent
Phase 3b: PM Agent (kugetsu)
pm-agentsession via kugetsuPhase 3c: Integration
Open Questions
Which chat protocol?TelegramRelated
Phase 3: Chat Integrationto Phase 3: Chat Integration (Telegram)Documentation created:
Documentation Created
Phase 3 architecture is now documented:
New Documentation Files
docs/kugetsu-chat.mddocs/kugetsu.mddocs/telegram-setup.mdKey Design Decisions
pm-agent(base) +pm-agent-{repo}(optional scaling)See docs/kugetsu-chat.md for full architecture.
shoko referenced this issue2026-03-30 17:42:01 +02:00
shoko referenced this issue2026-03-31 02:02:40 +02:00
Phase 3a PR #32 - Code Review Findings
After reviewing PR #32, we discovered several architectural issues that need to be addressed for Phase 3b.
Current Architecture Problems
kugetsu-helpers bypasses kugetsu CLI
kugetsu-helper delegate-to-pmcallsopencode run --continuedirectly instead of going through kugetsukugetsu-pm skill is documentation only
kugetsu initonly gets a simple text promptkugetsu-pm/SKILL.md(218 lines) is never actually loaded by the PM Agentopencode runcannot load external skills - only built-in agentskugetsu init creates PM without proper context
Proposed Solution for Phase 3b
1. Extend kugetsu CLI Commands
kugetsu statuskugetsu-helper check-statuskugetsu delegate <message>kugetsu-helper delegate-to-pmkugetsu doctorkugetsu doctor --fixkugetsu-helper fix-permissions2. Fix delegate command for PM Agent
Currently
kugetsu continueonly accepts issue-ref format (instance/user/repo#N). This should be relaxed - issue-ref is a guideline, not a hard format. Allow any session name:3. Inject kugetsu-pm at init time (once), not on every delegation
During
kugetsu init:During
kugetsu delegate <msg>:This way kugetsu-pm is read ONCE during init, not 10 times on 10 delegations.
4. Base PM session is immortal
kugetsu initshould NEVER be deleted5. Remove kugetsu-helpers
Once kugetsu CLI covers status, delegate, and doctor --fix:
kugetsu delegateinstead ofkugetsu-helper delegate-to-pm6. kugetsu-pm location
Since kugetsu injects it into opencode session during init (not loaded by opencode as a skill), consider moving from
skills/kugetsu-pm/tokugetsu/pm-agent.mdsince it is now kugetsu's responsibility.Summary of Changes Needed
kugetsu statuscommandkugetsu delegate <msg>command (with non-issue-ref session support)kugetsu doctor [--fix]commandkugetsu initto inject kugetsu-pm content into PM sessionkugetsu continue(allow any session name)kugetsu delegateinstead of kugetsu-helpersQuestions / RFC
Clarification: PR #32 Covers Whole Phase 3
PR #32 (Phase 3a) revealed architectural issues that affect both 3b and 3c. This PR will be updated to address the full Phase 3 scope:
What This PR Covers
Key Changes Coming
status,delegate <msg>,doctor [--fix]kugetsu continue, not just issue-refThis PR now encompasses the complete Phase 3 implementation.