Major changes: - Add internal/logging package with field constants, context propagation, sensitive data auto-redaction, and per-component log levels - Add worker timeout constants (TimeoutQuickOp, TimeoutHealthCheck, etc.) - Extend SDLC with callback handlers, generate endpoints, and executor - Add new cookbook trees for aeries and slackpath progression - Add skeleton templates for queue, realtime, and microservices - Add worker component template with async job processing - Refactor services and handlers to use new logging infrastructure - Split component.go into component_infra.go and component_listing.go Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3.9 KiB
3.9 KiB
Slack Preparation Analysis
To successfully build a Slack-like distributed system using the rdev agentic workflow, we must bridge the gap between our current capabilities and the requirements of the slackpath-* cookbooks.
1. Success Enablers (What we have)
pkg/apiChassis: A solid Go service foundation (Appstruct) that handles routing, logging (slog), middleware, and graceful shutdown. This allows us to spin up consistent APIs quickly.go-apiTemplate: A standardized backend service template ininternal/adapter/templates/templates/go-apithat likely uses the chassis.skeletonTemplate: A monorepo base to hold multiple services.- Tree Runner: A robust orchestration engine (
tree-runner.sh) that can execute complex workflows, manage state, and verify deployments. - Infrastructure: We seem to have K8s/Woodpecker integration via
deploy-k8sskill.
2. Functionality Gaps (What is missing)
Critical Infrastructure
- Missing Component Types: The cookbooks assume
type: worker,type: postgres, andtype: redis. Currently,internal/adapter/templates/templatesonly showsgo-api,astro-landing, andskeleton.- Risk:
add-dbandadd-workersteps will fail in the runner.
- Risk:
- Missing Shared Packages:
pkg/auth: No standard JWT verification middleware. Agent will have to write security code from scratch (high risk).pkg/redisorpkg/queue: No standard wrapper for Redis interactions or job queues.pkg/websocket: No standard WS upgrader/handler.
SDLC Automation
- Missing SDLC Commands: The cookbooks rely on
/spec-feature,/design-feature, and/implement-feature. These do not exist in.claude/commands/. - Missing API Logic: The
rdev-apiendpoints for SDLC (/sdlc/features,/builds) need to be verified to ensure they support the "Prompt-to-Code" flow described in the cookbooks.
3. Required Claude Configuration
We need to create/update these to enable the agentic workflow:
.claude/commands/implement-feature.md: Instructions for the agent on how to take a requirement and produce code..claude/commands/spec-feature.md: Instructions for generating a technical spec artifact..claude/commands/design-feature.md: Instructions for generating a DB schema/API design artifact..claude/skills/distributed-systems.md: A skill that teaches the agent about our specific patterns for Worker/API communication (e.g., "Always usepkg/queuefor async tasks").
4. Required SDLC Commands (in rdev-api)
The rdev-api needs to handle these operations (referenced in cookbooks):
POST /projects/{id}/sdlc/features: Register a feature.POST /projects/{id}/builds: Trigger an autonomous build task (Prompt -> Code).GET /projects/{id}/sdlc/next: The "Classifier" logic to tell the runner what to do next.
5. Core Packages & Patterns to Implement
Before running slackpath-1:
-
pkg/auth:GenerateToken(user User) (string, error)Middleware(secret string) func(http.Handler) http.HandlerUserFromContext(ctx) User
-
pkg/queue(for Path 2):Producerinterface (Enqueue(job))Consumerinterface (RegisterHandler(type, func))- Redis implementation.
-
pkg/realtime(for Path 3):- Websocket Hub implementation (register, unregister, broadcast).
- Redis Pub/Sub adapter for scaling across pods.
Action Plan
- Scaffold Missing Templates: Create
worker,redis(helm chart wrapper), andpostgres(helm chart wrapper) ininternal/adapter/templates/templates. - Build Shared Libs: Implement
pkg/authandpkg/queueto standardize the "hard parts". - Install SDLC Commands: Create the missing markdown files in
.claude/commands. - Verify API: Ensure
rdev-apihas the SDLC endpoints mounted.