atomic

flowstate-epic-flowstate-community-epicdm-flowstate-discord-bot

Package-local agent skill for @epicdm/flowstate-discord-bot.

Tags

Publisher

Versions

1 version published — latest: 0.1.0

  • 0.1.0
    publishedInvalid Date

Skill

flowstate-discord-bot Package Skill

Package: @epicdm/flowstate-discord-bot Repository: epic-flowstate-community Path: packages/flowstate-discord-bot Version: 0.1.0

Use this published Dojo skill as the package-level entrypoint. For detailed workflows, use the package-local skills listed below.

Primary Package Workflow

FlowState Discord Bot Config CLI

Status: Active legacy Purpose: Configure and operate the Discord bot CLI process. Scope: src/config.ts, src/types.ts, src/cli.ts. Trigger: Startup failure, env changes, health checks, org discovery, shutdown behavior. Input: Environment variables and service container context. Output: Valid config and predictable CLI startup path.


Required Env

AUTH_TOKEN=...
DISCORD_BOT_TOKEN=...
GUILD_ID=...

Defaults:

MCP_URL=http://mcp-http:3100
HEALTH_PORT=9095
RXDB_SERVER_URL=http://d1-worker:8787

CLI Flow

  1. Load and validate env with ConfigSchema.
  2. Start /health immediately with status discovering.
  3. Wait for MCP /health.
  4. Query non-archived orgs and select the first result.
  5. Create an org-scoped MCP caller.
  6. Start DiscordBotService.
  7. Set health status ok.
  8. Stop service and close health server on SIGINT/SIGTERM.

Troubleshooting

  • Missing token/guild env fails before Discord connection.
  • No active org causes startup failure.
  • Health returning discovering means the process is alive but service startup has not completed.

Verification

yarn workspace @epicdm/flowstate-discord-bot test --runTestsByPath packages/flowstate-discord-bot/tests/unit/config.test.ts packages/flowstate-discord-bot/tests/unit/DiscordBotService.test.ts

Created: 2026-06-30

Package Skill Inventory

@epicdm/flowstate-discord-bot Skill Inventory

SkillTypeUse When
flowstate-discord-botOrchestratorRouting Discord bot service, sync, deployment, and legacy maintenance work.
flowstate-discord-bot-config-cliWorkflow/referenceEnv config, CLI startup, health endpoint, org discovery, shutdown behavior.
flowstate-discord-bot-mcp-transportWorkflow/referenceMCP HTTP calls, response normalization, org-scoped caller, MCP readiness polling.
flowstate-discord-bot-service-lifecycleWorkflow/referenceDiscordBotService, Discord connection, guild resolution, syncer construction, startup reconciliation.
flowstate-discord-bot-discord-syncersWorkflow/referenceRole, channel/category, project channel, and team member sync behavior.
flowstate-discord-bot-reconciliation-mappingsWorkflow/referencediscord_mappings, startup reconcile, stale/deleted/archived statuses, mapping drift.
flowstate-discord-bot-deployment-legacyWorkflow/referenceDocker/compose/CLI references and legacy/deprecation caveats.
flowstate-discord-bot-maintenanceMaintenanceTests, build/typecheck, generated Dojo drift, package export and CLI changes.

These skills group the 15 feature inventory items into service workflows.

Review Gate

@epicdm/flowstate-discord-bot Skill Review

Created package-local skills for the Discord bot under packages/flowstate-discord-bot/.flowstate/skills.

Evidence Reviewed

  • package.json
  • src/index.ts
  • src/types.ts
  • src/config.ts
  • src/cli.ts
  • src/DiscordBotService.ts
  • src/clients/McpHttpClient.ts
  • src/management/ManagementBot.ts
  • src/sync/MappingStore.ts
  • src/sync/RoleSyncer.ts
  • src/sync/ChannelSyncer.ts
  • src/sync/MemberSyncer.ts
  • src/sync/SyncEngine.ts
  • src/sync/reconciler.ts
  • src/sync/rate-limiter.ts
  • .flowstate/feature-matrix/inventory.md
  • .flowstate/dojo/agent-skillset.md
  • docs/spec references describing this package as legacy/deprecated

Review Notes

  • This package has real service behavior and Docker/CLI references, despite being marked legacy in planning docs.
  • Package skills teach operational flows rather than individual feature names.
  • Top-level live event sync is not fully wired; DiscordBotService starts SyncEngine with a no-op event source.
  • Actual package export is narrow (types, loadConfig); generated feature inventory and Dojo overstate internal source exports as public API.
  • Deployment config has a port drift caveat: package default health port is 9095, while compose/service templates reference 3200 in some paths.

Verification Status

  • ASCII scan passed: no non-ASCII characters in .flowstate/skills.
  • Skill frontmatter scan passed for all 8 SKILL.md files.
  • yarn workspace @epicdm/flowstate-discord-bot test passed: 11 suites, 117 tests; tests emitted expected logger console.error/console.warn output from exercised failure and lifecycle paths.
  • yarn workspace @epicdm/flowstate-discord-bot typecheck passed.
  • yarn workspace @epicdm/flowstate-discord-bot build passed.
  • yarn nx build @epicdm/flowstate-discord-bot passed; Nx rebuilt obs-client and obs-middleware, then reported the existing unconnected-workspace 401 notice.

Usage

Start with this skill to understand the package purpose, then use the package-local focused skills for specific workflows. Keep this Dojo version aligned with packages/flowstate-discord-bot/package.json. Do not treat generated feature lists as lessons; use workflow evidence from CODE-REVIEW.md, SKILL-INVENTORY.md, and REVIEW.md.

Install

Run this in your project to install via CLI:

fscloud dojo skill install flowstate-epic-flowstate-community-epicdm-flowstate-discord-bot --target <target> --out ./skills

Replace <target> with your agent target identifier. See the CLI docs for details.