Skip to main content

add-database-transaction-boundaries

Add database transaction boundaries that protect stated invariants across reads, writes, concurrency, errors, and retries. Use when several database changes must commit or fail as one logical operation.

소스 정보

저장소
protosphinx/sphinxstack
최근 소스 활동
2026년 7월 29일 13:55
감지된 SKILL.md 언어
영어
스타
2
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
2 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
add-database-transaction-boundaries
category
code
description
Add database transaction boundaries that protect stated invariants across reads, writes, concurrency, errors, and retries. Use when several database changes must commit or fail as one logical operation.
# add-database-transaction-boundaries Define the invariant and isolation need before opening a transaction. ## When to use - Use for related writes, read-modify-write logic, allocation, balances, ownership, or state transitions. - Do not hold transactions across user input, slow networks, or irreversible external effects. ## Procedure 1. State the business invariant, records, competing transactions, and observable failure. 2. Choose the smallest boundary and required isolation based on actual anomalies. 3. Acquire rows or constraints in a consistent order and rely on database-enforced uniqueness where possible. 4. Keep external effects outside the transaction through outbox, intent, or compensation design. 5. Propagate one transaction context and prevent helpers from committing independently. 6. Classify retryable deadlocks or serialization failures and make the operation idempotent. 7. Roll back on every error and preserve useful diagnostics without sensitive values. 8. Test concurrent interleavings, failures, retries, and final invariants. ## Done - A transaction design document records invariant, boundary, isolation, lock order, external-effect strategy, and retry rules - Concurrent and fault tests verify atomic commit, rollback, deadlock handling, and preserved invariants
GitHub에서 보기