analyzing-options
Analyzing different approaches for a task or problem with structured comparisons, effort…
Mapping the eventable points in a Lerian Go service where lib-streaming should emit past-tense, durable, tenant-scoped business events, producing a PM-validated event catalog and instrumentation-map.json for ring:instrumenting-streaming-events. Three-pass discovery (Survey,
$ npx -y skills add LerianStudio/ring --skill mapping-streaming-events --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/mapping-streaming-eventsContext preview
The summary Claude sees to decide when to auto-load this skill.
Mapping the eventable points in a Lerian Go service where lib-streaming should emit past-tense, durable, tenant-scoped business events, producing a PM-validated event catalog and instrumentation-map.json for ring:instrumenting-streaming-events. Three-pass discovery (Survey,
name: ring:mapping-streaming-events description: "Mapping the eventable points in a Lerian Go service where lib-streaming should emit past-tense, durable, tenant-scoped business events, producing a PM-validated event catalog and instrumentation-map.json for ring:instrumenting-streaming-events. Three-pass discovery (Survey, Slice, Mark) with a scope fence and delivery postures. Use to inventory eventable points. Skip on non-Go, infra-only, or consumer-only services."
**Runs before:** ring:instrumenting-streaming-events
**Complementary:** ring:instrumenting-streaming-events, ring:codebase-explorer, ring:mapping-feature-relationships
Orchestrates 3-pass codebase discovery to produce an event catalog and instrumentation map for lib-streaming. You orchestrate. Agents explore. You NEVER read, write, or edit source code directly.
**Announce at start:** "Using ring:mapping-streaming-events through 7 gates (0-7)."
lib-streaming is a producer-only, write-only event-emission library for Lerian Go services. Events are emitted via `emitter.Emit(ctx, EmitRequest{DefinitionKey, TenantID, Subject, Payload})` against the `streaming.Emitter` interface (constructed via `streaming.NewBuilder().Catalog(...).Build(ctx)`). Wire format: CloudEvents 1.0 binary mode. Each `RouteDefinition` selects a transport — Kafka, SQS, RabbitMQ, EventBridge, or Custom. Per-tenant SaaS subscription remains the primary delivery model regardless of transport; Kafka topic naming is `lerian.streaming.<resource>.<event>[.vN]` with tenant carried on the `ce-tenantid` CloudEvents header.
**WebFetch canonical docs:** `https://raw.githubusercontent.com/LerianStudio/lib-streaming/main/doc.go` **WebFetch agent constraints:** `https://raw.githubusercontent.com/LerianStudio/lib-streaming/main/AGENTS.md` **WebFetch changelog:** `https://raw.githubusercontent.com/LerianStudio/lib-streaming/main/CHANGELOG.md`
A candidate is a **streamable business fact** if and ONLY if ALL of: 1. **Past-tense** — something that already happened (`account.created`, not `account.create`) 2. **Durable** — the underlying state is persisted 3. **Broadcastable** — multiple consumers could legitimately receive it 4. **Tenant-scoped** — the event belongs to a tenant (or marked SystemEvent with explicit justification)
Candidates failing ANY of the four → REJECT with documented reason.
| Posture | Direct | Outbox | DLQ | Use when | |---------|--------|--------|-----|----------| | CRITICAL | skip | always | on_routable_failure | Loss is correctness/compliance breach; atomic with DB write | | IMPORTANT | direct | fallback_on_circuit_open | on_routable_failure | Direct in normal ops; survives broker outage | | OBSERVATIONAL | direct | never | never | Analytics-grade; loss acceptable | | CUSTOM | per-event | per-event | per-event | None above fits — requires ≥80 char justification |
| Gate | Name | Agent | Always? | |------|------|-------|---------| | 0 | Stack Detection | Orchestrator (grep + read) | Yes | | 1 | Pass 1 — Survey | ring:codebase-explorer (single) | Yes | | 2 | Pass 2 — Slice + Scope Fence | ring:codebase-explorer (single) | Yes | | 3 | Pass 3 — Mark | ring:codebase-explorer (parallel, 1/segment) | Yes | | 4 | Catalog Assembly + Validation | Orchestrator (deterministic) | Yes | | 5 | Business Rendering | Orchestrator | Yes | | 6 | PM Team Validation | User (PM team) — NEVER SKIPPABLE | Yes | | 7 | Handoff Package | Orchestrator | Yes |
Gates execute sequentially. Pass 3 (Gate 3) parallelizes internally per segment.
Orchestrator executes directly. Detect in parallel:
1. Go version: grep "^go " go.mod | head -1 2. lib-streaming: grep "lib-streaming" go.mod 3. HTTP framework: grep -rn "gofiber/fiber\|labstack/echo\|gin-gonic" internal/ go.mod 4. gRPC server: grep -rn "grpc.NewServer" internal/ 5. RabbitMQ command consumers: grep -rn "lib-commons/v5/commons/rabbitmq" internal/ # command-queue plumbing; eventable publish sites should migrate to lib-streaming 6. Scheduled jobs: grep -rn "robfig/cron\|time.NewTicker" internal/ 7. Webhook receivers: grep -rn "webhook\|/hooks/" internal/ 8. Worker patterns: grep -rn "commons.Launcher\|commons.App" internal/ 9. Tenant source: grep -rn "tmcore.GetTenantIDContext\|GetTenantID" internal/ 10. DDD layout: ls internal/services/ internal/domain/ 2>/dev/null 11. Database: grep -rn "jackc/pgx\|database/sql" go.mod
**HARD GATE:** If not Go → STOP. If tenant source undetectable → STOP and ask user.
Dispatch `ring:codebase-explorer` to produce `docs/streaming/_pass1-survey.md` with:
Proven engineering practices, enforced through skills. Ring is a comprehensive skills library and workflow system for AI agents that transforms how AI assistants approach software development.
Repo: LerianStudio/ring
Analyzing different approaches for a task or problem with structured comparisons, effort…
Auditing a service's production readiness against Ring engineering standards across base…
Cleaning redundant and obvious comments following clean code principles while preserving…
Commit changes with scope allowlist enforcement, atomic grouping, GPG-signed conventional…
Creating a handoff document that captures session state (completed work, decisions, open…
Creating an isolated git worktree for parallel branch work: selects the directory by priority…