Repository navigation
docs(api): add idempotency-key implementation guidance to api-and-interface-design - #479
Merged
addyosmani merged 1 commit intoAug 14, 2026
Conversation
abhisheksharma2411
force-pushed
the
feat/idempotency-and-exactly-once-skill
branch
from
August 10, 2026 06:50
3e1b82a to
07e2c0e
Compare
addyosmani
reviewed
Aug 11, 2026
addyosmani
left a comment
Owner
There was a problem hiding this comment.
Solid content, but idempotency and exactly-once overlap api-and-interface-design, which already covers idempotency (expanded in #241). I'd rather fold the distributed-systems depth into that skill than stand up a parallel one. Can you rework it as an addition to api-and-interface-design? Holding as its own skill for now.
Reworked from a standalone skill into an addition to api-and-interface-design, per review feedback on addyosmani#479. addyosmani#241 covers the contract surface: which methods are idempotent, accepting an Idempotency-Key header, replaying the stored result. This picks up where that stops -- what the server has to do so the guarantee actually holds: * derive the key from the intent, not the attempt, with the patterns that look right and are not (randomUUID per call, timestamps, user+amount) * claim atomically; a SELECT then an INSERT is a race, and the unique constraint is the mechanism * guard the payload, so a reused key with a different body fails loudly instead of replaying the wrong response * decide deliberately what an in-flight duplicate receives -- 409, wait, or 202 -- rather than accepting whatever falls out of the control flow * treat unknown as a third outcome distinct from failure, and record intent before calling out so a crash leaves evidence * set key retention from the longest re-delivery path, including DLQ replay Adds three rationalizations, four red flags and five verification items so the guidance is enforceable rather than advisory. Validators: validate-skills 24 skills 0 errors 0 warnings, validate-reference-links 0 errors, run-evals --min-rank1 80 -> 124 checks, 0 errors, rank-1 86%.
abhisheksharma2411
force-pushed
the
feat/idempotency-and-exactly-once-skill
branch
from
August 13, 2026 00:04
07e2c0e to
ce89b03
Compare
addyosmani
approved these changes
Aug 14, 2026
addyosmani
left a comment
Owner
There was a problem hiding this comment.
This is the right shape now, folded into api-and-interface-design as I'd hoped, and 'derive the key from the intent, not the attempt' is genuinely useful. One coordination note: #241 also expands this skill's idempotency coverage, so whichever lands first the other needs a quick rebase. Approving the content.
hillemacher
pushed a commit
to hillemacher/agent-skills
that referenced
this pull request
Aug 17, 2026
Reworked from a standalone skill into an addition to api-and-interface-design, per review feedback on addyosmani#479. addyosmani#241 covers the contract surface: which methods are idempotent, accepting an Idempotency-Key header, replaying the stored result. This picks up where that stops -- what the server has to do so the guarantee actually holds: * derive the key from the intent, not the attempt, with the patterns that look right and are not (randomUUID per call, timestamps, user+amount) * claim atomically; a SELECT then an INSERT is a race, and the unique constraint is the mechanism * guard the payload, so a reused key with a different body fails loudly instead of replaying the wrong response * decide deliberately what an in-flight duplicate receives -- 409, wait, or 202 -- rather than accepting whatever falls out of the control flow * treat unknown as a third outcome distinct from failure, and record intent before calling out so a crash leaves evidence * set key retention from the longest re-delivery path, including DLQ replay Adds three rationalizations, four red flags and five verification items so the guidance is enforceable rather than advisory. Validators: validate-skills 24 skills 0 errors 0 warnings, validate-reference-links 0 errors, run-evals --min-rank1 80 -> 124 checks, 0 errors, rank-1 86%.
nad-au
added a commit
to dbc-tech/agent-skills
that referenced
this pull request
Aug 21, 2026
* docs(security): add data privacy & compliance section Adds a Data Privacy & Compliance section to security-and-hardening: PII/sensitive classification, data minimization + purpose, retention/deletion paths (incl. backups), data-subject rights (GDPR/CCPA), consent for third-party/vendor sharing, and data residency. Complements the hardening content (can an attacker read it) with the privacy question (should we hold it, and for how long). * fix(security): trim frontmatter description to clear eval routing regression The privacy trigger phrase used generic verbs (collecting, storing, retaining, deleting, sharing) that pulled the security skill's routing rank above other skills on unrelated prompts. Replacing with a tight 'personal data or privacy compliance' phrase preserves discoverability without over-triggering. * evals: make the TDD behavioral case discriminate skill effect Replace the invoice fixture with a split-payment project where the obvious remainder-dump fix passes the existing suite and the reported case but violates a README fairness invariant. Neutral eval-1 prompt (no test-first hint), pressure eval-2 now dictates the wrong one-liner under a hotfix deadline. Expectations pin the exact earliest-shares arrays so every remainder-dump variant is distinguishable, and the schema example in evals/README.md is synced to the new eval 1. * fix(evals): reject incomplete grader results * fix(hooks): emit the standard SessionStart envelope (addyosmani#465) The session-start hook emitted {"priority", "message"} JSON on all three of its output paths. Codex CLI validates SessionStart hook output and fails the hook on that shape ('hook returned invalid session start JSON output', addyosmani#465); the documented contract for both Codex and Claude Code is {"hookSpecificOutput": {"hookEventName": "SessionStart", "additionalContext": "..."}} Switch all three paths (meta-skill injection, jq-missing fallback, meta-skill-missing fallback) to that envelope. Verified each path emits valid JSON of the new shape: happy path via jq shape assertion, jq-missing via PATH='' run, meta-skill-missing via a copy outside the repo. * feat(spec): add Phase 0 scope check — capability map for multi-capability requirements (addyosmani#431) Implements the v1 scope agreed in addyosmani#431: when one requirement bundles several independently testable capabilities, spec-driven-development now runs a bounded front-step before Specify — detect multi-capability scope, propose a capability map (stable module ids, one-way dependency direction, build order), gate it on human approval, then recurse the gated workflow per module in dependency order. Kept deliberately small per the maintainer's scoping: - detection + module map + stable identity only; no per-module artifact tree — module specs reuse the root-level SPEC-<id>.md naming so the layout follows the delta-spec direction in addyosmani#383 rather than leading it - the simple path is preserved: single-capability requests skip Phase 0 entirely, and the section says so first - non-goals held: no PM framework, no forced hierarchy on small features Also: - description gains the decomposition vocabulary so realistic asks route here (both new positive triggers rank #1) - /spec command wrappers (.claude, commands/, .gemini) gain one matching step, kept in parity - eval case: +2 positive triggers, +1 owner-negative guarding the planning-and-task-breakdown boundary, +1 execution eval backed by a new multi-capability fixture (portal-brief.md) Verification: validate-skills 24/24, validate-commands 8/8, run-evals 127 checks 0 errors 0 warnings, rank-1 86% (67/78) over floor 80, behavioral dry-run resolves both spec evals. * docs(antigravity): correct plugin install path per Issue addyosmani#445 The setup doc claimed plugins install to ~/.gemini/antigravity-cli/plugins/ but on current agy releases they land in ~/.gemini/config/plugins/. Issue addyosmani#445 reporter confirmed the plugin lives under config/ on disk. Update the path and add a note so users check the right location first. Signed-off-by: Yunare Maia <yunare@gmail.com> * fix(planning): define a single pluggable task list target (addyosmani#482) The task list destination was hardcoded as tasks/todo.md in five places across planning-and-task-breakdown, plus once more in spec-driven-development's Phase 2 output convention. Projects tracking tasks in an external tracker (bd/beads, Jira, Linear, GitHub Issues) had to hand-edit every reference in a local fork. Define the target once in a Task List Target section: default remains the tasks/todo.md markdown checklist (downstream /build behavior is unchanged), and projects can designate an external tracker via their agent rules. All other references now defer to that single definition, and spec-driven-development points at it instead of restating the path. * docs(api): add idempotency-key implementation guidance Reworked from a standalone skill into an addition to api-and-interface-design, per review feedback on addyosmani#479. addyosmani#241 covers the contract surface: which methods are idempotent, accepting an Idempotency-Key header, replaying the stored result. This picks up where that stops -- what the server has to do so the guarantee actually holds: * derive the key from the intent, not the attempt, with the patterns that look right and are not (randomUUID per call, timestamps, user+amount) * claim atomically; a SELECT then an INSERT is a race, and the unique constraint is the mechanism * guard the payload, so a reused key with a different body fails loudly instead of replaying the wrong response * decide deliberately what an in-flight duplicate receives -- 409, wait, or 202 -- rather than accepting whatever falls out of the control flow * treat unknown as a third outcome distinct from failure, and record intent before calling out so a crash leaves evidence * set key retention from the longest re-delivery path, including DLQ replay Adds three rationalizations, four red flags and five verification items so the guidance is enforceable rather than advisory. Validators: validate-skills 24 skills 0 errors 0 warnings, validate-reference-links 0 errors, run-evals --min-rank1 80 -> 124 checks, 0 errors, rank-1 86%. * chore(release): bump plugin manifests to 0.6.7 * docs(specs): anchor spec paths to repository root (/specs/**) Models resolved specs/<feature>/ inconsistently — some as repo-root, others relative to the current working directory (apps/specs/...). All pipeline paths now use the leading-/ form (/specs/<feature>/SPEC.md, /specs/<feature>/tasks/{plan,todo}.md) with an explicit Path Anchoring note in spec-driven-development and planning-and-task-breakdown, and repo-root qualifiers in the /spec, /plan, and /issue-build commands. Legacy root fallbacks (SPEC.md, tasks/) and historical docs unchanged. * feat(issue-pr): apply the build label to implementation PRs issue-create labels build issues 'build' but the PRs that resolve them were unlabelled, so implementation PRs and spec PRs were inseparable in GitHub's filter view. issue-pr now ensures the label exists (gh label create build --force, same convention as issue-create) and passes --label build to gh pr create. Skill steps renumbered (label step inserted as Step 6), rationalizations/red flags/verification updated, and the behavioural eval expects the label. * feat(issue-pr): prefix implementation PR titles with [BUILD] The PR title now keeps the [BUILD] prefix from the build issue (previously stripped), so implementation PRs group with their build issues in listings and search, and are distinguishable from [SPEC] PRs. Custom titles get the prefix too. Red flags and verification checklist updated; behavioural eval expects the prefixed title. --------- Signed-off-by: Yunare Maia <yunare@gmail.com> Co-authored-by: Arun Kumar Thiagarajan <arunkt.bm14@gmail.com> Co-authored-by: Federico Bartoli <federico.bartoli@madisoft.it> Co-authored-by: NgoQuocViet2001 <ngoquocviet2001@gmail.com> Co-authored-by: ayobamiseun <adegokeayobamiseun@gmail.com> Co-authored-by: Addy Osmani <addyosmani@gmail.com> Co-authored-by: Yunare Maia <yunare@gmail.com> Co-authored-by: Abhishek Sharma <abhicse24@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reworked as an addition to
api-and-interface-design, per @addyosmani's review. One file, +73, no new skill.Where the seam is
#241 covers the contract: which methods are idempotent, accepting an
Idempotency-Keyheader, replaying the stored result. This picks up where that stops — what the server has to do so the guarantee actually holds. A key you accept but handle carelessly is worse than no key, because the client now believes retrying is safe.Added as
### 6. Honouring an Idempotency Keyunder Core Principles:randomUUID()per call, a timestamp,user + amountSELECTthen anINSERTis a race; the unique constraint is the mechanismPlus 3 rationalizations, 4 red flags and 5 verification items, so it's enforceable rather than advisory.
On the overlap
You were right that a standalone skill was the wrong shape, and the repo's own tooling agreed more than I expected. When I ran the evals with the separate skill in place, its description outranked
debugging-and-error-recoveryon that skill's own prompt ("this test passed yesterday and fails today") — a false positive I couldn't tune away, because design-time failure analysis and diagnosing a live break genuinely share vocabulary.Folding it in removes that entirely. Rank-1 routing goes from 85% to 86%, better than either the baseline or the standalone version.
Sequencing
#241 is still open and touches the same skill, though a different section — it adds an
### Idempotencysubsection under REST/HTTP semantics, and this sits in Core Principles. I've deliberately not touched the frontmatter description or the README row, since #241 already updates both.If #241 lands first I'll rebase; if this lands first #241 should apply cleanly. Happy to reorder or to merge the two into one section if you'd rather have a single home for it — just say which.
Thanks for the steer — the folded version is tighter than what I first sent.