trove-principle-idempotency
Make Operations Idempotent — design commands, lifecycle steps, and processing loops to converge to the same end state regardless of how many times they run or where a previous run stopped. Use when designing operations that run amid crashes, restarts, and retries (jobs, deploys, lifecycle steps, queues).
- License 许可
- MIT
- 所属仓库
- bravew/trove
- 最近更新
- 2026-11-12
- Stars
- ★ 10
- Forks
- 1
01 前言 Front Matter
- name
- trove-principle-idempotency
- metadata
- { "trove-category": "code", "trove-category-label": "Code" }
- description
- Make Operations Idempotent — design commands, lifecycle steps, and processing loops to converge to the same end state regardless of how many times they run or where a previous run stopped. Use when designing operations that run amid crashes, restarts, and retries (jobs, deploys, lifecycle steps, queues).
03 SKILL.md 正文
<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly --> <!-- Regenerate: bun run build:skills -->
Principle: Make Operations Idempotent
An operation should converge to the correct end state no matter how many times it runs or where a previous run stopped.
Derive each step from the state you observe, not from an assumption about where the last run stopped. A step that checks what is already true and does only the remaining work converges on its own. A step that assumes a fresh start needs a guard, and a guard is one more thing that can be wrong after a crash.
Before shipping an operation, run it twice, kill it halfway and run it again, and confirm both end at the same state.
Highly relevant to trove-jobs (SQS/SNS retries), CDK/Terraform deploys, and Lambda handlers — anything the platform will retry on your behalf.
04 同仓库更多 Skills
using-trove
Skill discipline anchor for the Trove marketplace. Loaded once per session; routes the agent to the right trove-* skill before code, planning, review, or git actions.
trove-write-skill
Skill authoring workflow. Use when creating or updating a Codex or Trove skill, including rubrics, tasks, metadata, and validation.
trove-worktree
Git worktree workflow for spikes, risky experiments, and broad refactors that should not disturb the user's current branch.
trove-why
Reconstruct design rationale and decision history from evidence — source control, issue tracker (Linear), docs (Notion), chat (Slack), error tracking (Sentry) — with calibrated confidence. Use for "why does X work this way", "why did we pick Y", regressions, and postmortems. Use trove-explain for how it works now.
trove-verify
Completion verification workflow. Use before claiming done, fixed, complete, ready, or shipped.
trove-unslop
Cut AI tells from writing — PR descriptions, release notes, specs, commit bodies, and replies. Use before finalizing prose, or when the user asks to clean up, de-slop, or make text sound human.