data-value-patterns
Data Value Patterns
Use this skill when raw events are not yet useful enough for analytics, product decisions, or downstream serving.
Default procedure
- Identify what is missing from the raw data:
- business context
- technical context
- summarized measures
- user sessions
- stable ordering
- Choose the smallest pattern that adds the missing value.
- Keep raw lineage visible so debugging is still possible.
- Favor reusable intermediate entities over one-off dashboard-specific transforms.
Pattern guide
- Add static reference context: static joiner (use SCD Type 2 joins when reference data has historical changes)
- Join two moving streams: dynamic joiner
- Keep raw plus computed values together: wrapper
- Add hidden job metadata: metadata decorator
- Aggregate across distributed data: distributed aggregator (use salting to mitigate data skew on hot keys)
- Aggregate where keys are already co-located: local aggregator
- Build sessions in batch: incremental sessionizer
- Build sessions in streaming: stateful sessionizer
- Preserve delivery order to fragile sinks: bin pack or FIFO orderer
Defaults
- Use static joins unless both sides are genuinely streaming.
- Use local aggregation when partitioning or storage layout already matches the group key.
- Use incremental sessionizer for hourly or daily batch session facts.
- Use stateful sessionizer only when low-latency sessions are required.
- Keep technical metadata hidden from business-facing marts unless users explicitly need it.
Gotchas
- Sessionization is forward-dependent; replaying one partition can force replay of later partitions too.
- A wide aggregate is not automatically reusable. Keep the grain and consumer clear.
- Hidden metadata is valuable for operations, but do not leak it into business definitions.
- Ordering guarantees for delivery do not replace correctness checks on the target side.
References
- Read references/value-patterns.md when the task involves enrichment, aggregation design, session facts, or ordering constraints.
More from jimnguyendev/jimmy-skills
backend-go-testing
Provides a comprehensive guide for writing production-ready Golang tests. Covers table-driven tests, test suites with testify, mocks, unit tests, integration tests, benchmarks, code coverage, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, memory leaks, CI with GitHub Actions, and idiomatic naming conventions. Use this whenever writing tests, asking about testing patterns or setting up CI for Go projects. Essential for ANY test-related conversation in Go.
14backend-go-code-style
Golang code style and readability conventions that require human judgment. Use when reviewing clarity, naming noise, file organization, package boundaries, comments, or maintainability tradeoffs in Go code. Do not use this for golangci-lint setup or lint output interpretation; use `jimmy-skills@backend-go-linter` for tooling.
12backend-go-safety
Defensive Golang coding to prevent panics, silent data corruption, and subtle runtime bugs. Use whenever writing or reviewing Go code that involves nil-prone types (pointers, interfaces, maps, slices, channels), numeric conversions, resource lifecycle (defer in loops), or defensive copying. Also triggers on questions about nil panics, append aliasing, map concurrent access, float comparison, or zero-value design.
11engineering-rest-api-design
REST API design conventions covering URL structure, HTTP methods, pagination, async patterns, idempotency, error envelopes, and API documentation standards. Use when designing new endpoints, reviewing API contracts, or establishing API guidelines before implementation in any language.
11backend-go-design-patterns
Idiomatic Golang design patterns for real backend code: constructors, error flow, dependency injection, resource lifecycle, resilience, data handling, and package boundaries. Apply when designing Go APIs, structuring packages, choosing between patterns, making architecture decisions, or hardening production behavior. Default to simple, feature-first designs unless complexity has clearly appeared.
11backend-go-grpc
Provides gRPC usage guidelines, protobuf organization, and production-ready patterns for Golang microservices. Use when implementing, reviewing, or debugging gRPC servers/clients, writing proto files, setting up interceptors, handling gRPC errors with status codes, configuring TLS/mTLS, testing with bufconn, or working with streaming RPCs.
11