State Lifetime Decision

Decide the right home for a new piece of state — its scope (turn, step, chat/thread, user-session, user, org, global) and its durability (ephemeral, TTL'd, durable, log) — as an explicit product-and-systems decision rather than a default. Forces the cross-cutting checks that get missed: per-user/tenant isolation, staleness and invalidation, growth/bloat bounds, and the cache implication. Triggers on "where should this live", "how long should we keep this", "should this persist", "what's the scope of this state", "cache or db or redis", "per chat or per user", "ttl for this", "session vs chat scope", "should we remember this". Use when adding or changing stored/remembered state in an app or agent — before picking a store.

hiteshbandhu Updated

File contents

hiteshbandhu/skills-i-use/tree/main/skills/state-lifetime-decision commit 001eed0029

Frequently asked questions

npx skillmds@latest add hiteshbandhu/state-lifetime-decision