🤖
🟢 LIVE
Railway deployment
p31-bot
Community Command Plane
20+ slash commands serving the P31 Labs Discord community. Spoon ledger, egg tracker, quantum egg hunt, founding nodes registry, telemetry relay, and book announcement — all wired into the broader P31 mesh.
01. Architecture
Discord.js v14 + TypeScript, deployed to Railway. Every command follows the P31Command interface pattern with auto-registration and graceful help generation.
-
▸
P31Command interface —
{"{ data: SlashCommandBuilder, execute(interaction) }"}. All commands implement this pattern; the registry handles auto-registration with Discord API. - ▸ Services layer — SpoonLedger, EggTracker, FawnDetector, QuantumEggHunt, CortexWebhook, WebhookHandler, TelemetryService. Each service is independently testable.
-
▸
Vitest test suite — 4 test files:
base.test.ts,claim.test.ts,eggTracker.test.ts,spoonLedger.test.ts. - ▸ Docker + Railway — Dockerfile + docker-compose for local dev; Railway handles production deployment with automatic restarts.
- ▸ CortexWebhook service — pipes significant community events back to p31-cortex for agent processing and Genesis Gate telemetry.
02. Command Surface
CORE COMMANDS (20+)
{['/bonding','/base','/claim','/cortex','/deploy','/easter','/eggs','/esg','/health','/help','/housing','/leaderboard','/nodes','/rehoused','/social','/spoon','/status','/telemetry','/book'].map(cmd =>
`${cmd}`
).join('')}
Spoon Ledger
Tracks cognitive energy units across the community. Spoons are earned, spent, and transferred. The ledger persists across sessions and feeds into community health metrics.
Quantum Egg Hunt
Seasonal engagement game mapped to SIC-POVM measurement events. Eggs are hidden across the mesh; discovery events fire telemetry. Tracked in
egg-progress.json.Founding Nodes
150-slot Dunbar's number registry in
founding-nodes.json. First 150 community members to claim a node are founding members of the mesh.FawnDetector
Identifies trauma freeze/fawn response patterns in community interactions — over-apologising, compulsive agreeableness, self-silencing. Surfaces patterns without diagnosis.
/book COMMAND
Announces the children's book with a rich Discord embed — title, dedication, and a direct link to
mother-nature-book.pages.dev. Wired to the book deployment event.Deployment
Status
🟢 LIVE
Platform
Railway
Commands
20+
Library
Discord.js v14
Ecosystem
Tech Stack
Discord.js v14
TypeScript
Railway
Docker
Vitest