rebuild: replace Python service with pi-based Slack bot - #44
Conversation
The service is being rebuilt as a Slack-native bot on the pi agent harness (TypeScript/Bun). The full Python implementation remains available on the archive/python-legacy branch; dropping it from main keeps the rebuild free of dead code.
Same mission as the old service - turn product ideas into PRDs and tickets - rebuilt as a Slack bot instead of an HTTP service: - Slack via @slack/bolt in Socket Mode (no public endpoint needed); app mentions and DMs trigger a pi agent run, the reply lands in the thread. - pi agent (@earendil-works/pi-ai + pi-agent-core) drafts a structured PRD via a terminal submit_prd tool and files one GitHub issue per user story via a create_github_issue tool. - GitHub issues through plain fetch, no octokit. - DRY_RUN defaults to true (carried over from the old service): the reply shows the issue payloads that would be filed, nothing is written to GitHub until explicitly disabled. - Tests run on pi-ai's fauxProvider plus a mocked fetch - no network or API keys required.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
Summary
Full rewrite of Agent PM. The old Python/FastAPI service is removed from main and preserved on the
archive/python-legacybranch. Same mission — turn product ideas into PRDs and tickets — rebuilt as a Slack-native bot on the pi agent harness (TypeScript, Bun) instead of an HTTP service.What v1 does
@earendil-works/pi-ai+pi-agent-core) drafts a structured PRD (title / summary / problem / goals / non-goals / user stories with acceptance criteria), captured through a terminalsubmit_prdtool.create_github_issuetool (plainfetchagainst api.github.com — no octokit).Slack uses Socket Mode (
@slack/bolt), so no public HTTP endpoint is needed.Config
SLACK_BOT_TOKEN/SLACK_APP_TOKENOPENAI_API_KEYGITHUB_TOKEN/GITHUB_REPOowner/nameDRY_RUNtrueMODELgpt-4o-miniTest plan
bun test— 24 tests: config parsing/validation, GitHub client against a mockedfetch, and full agent runs against pi-ai'sfauxProvider()(PRD capture, dry-run vs real issue filing, model-error and no-submit failure paths). No network or API keys required.bunx tsc --noEmit— clean (strict +noUncheckedIndexedAccess).bunx biome ci .— clean.Not verified
DRY_RUN=true(the default) to review would-be issue payloads in Slack before enabling issue creation.Notes
@earendil-works/pi-ai@0.82.0,pi-agent-core@0.82.0,@slack/bolt@4.7.3; dev: typescript, @types/node, bun-types, @biomejs/biome. Nothing else.src/is ~400 lines; old dependabot config replaced with npm ecosystem; LICENSE (MIT) preserved.