Repository navigation
feat(skills): add partial-outcome-analysis - #512
abhisheksharma2411 wants to merge 3 commits into
Conversation
addyosmani
left a comment
There was a problem hiding this comment.
This is well-built (clear discipline, eval case and fixtures included) and the concept is genuinely useful: specifying partial-failure behavior before the happy path. But adding a new skill is a scope call I'm being deliberate about right now, same as the database skill in #492, so I'm going to hold it for a conversation rather than merge. Not a no, just not an automatic yes. Leaving it open.
|
That's completely fair, and honestly the right instinct — a skills repo gets worse the moment new skills land faster than the taxonomy can absorb them, and "is this a skill or is it a paragraph in an existing one?" is a question only you can answer for this repo. Happy to leave it parked. One thing that might make the eventual call easier, whichever way it goes: the substance here is a contract — specify partial-failure behaviour before the happy path — and that doesn't strictly need its own skill to exist. If it turns out to fit better as a section inside an existing one, or merged with whatever #492 becomes, I'm glad to rework it that way instead. I'd rather it land in the shape you want than in the shape I happened to write it. No rush from me, and no need to reply until you've had the conversation you want to have. |
Specifying what an operation does when a dependency times out, stalls, or leaves an outcome unknown, at design time rather than after the incident. The gap, checked rather than assumed. A concept scan across all 24 skills found zero hits for partial failure, split brain, clock skew, thundering herd, cascading failure, backpressure, circuit breaker, quorum, network partition, dead letter and consensus. The terms that do appear are almost all in api-and-interface-design, which owns the request axis: deriving and honouring an idempotency key. debugging-and-error-recovery is reactive triage for something already broken, and doubt-driven-development is about assumptions rather than dependency behavior. None of them decide what happens on a timeout before the code is written. The skill routes to those siblings rather than restating them: the idempotency implementation to api-and-interface-design, live diagnosis to debugging-and-error-recovery, telemetry to observability-and-instrumentation. Named and worded around the eval router rather than against it. The first draft was called failure-mode-analysis, and the run-evals gate caught three real problems with it: the doubled name token "mode" made it rank first for "Add a dark mode toggle", and "failure" stemmed together with "fails" so it outranked debugging-and-error-recovery on that skill's own prompt. A later draft leaned on "boundary" and "design" and collided with spec-driven-development instead. Removing the "NOT for" clause from the description made things worse, not better, because a bag-of-words router scores a negative clause exactly like a positive one — that guidance now lives in the body, where it reads to a human and not to the ranker. The final description is deliberately short. Adding a 25th skill shifts the IDF corpus and can demote an unrelated skill below the top-3 threshold even when the new skill is nowhere near the prompt; a shorter, more distinctive description perturbs less. Verified with the repo's own CI steps: validate-skills 25/0/0, run-evals --min-rank1 80 PASSED at 85%, reference-links, versions, commands and artifact-paths all clean, and the validator test suites green.
7b85f6c to
2c8ca6d
Compare
Both conflicts were the skill count: this branch adds `partial-outcome-analysis`, so the README heading and the anchor that `docs/adoption-guide.md` links to read 26 while main reads 25. Resolved to 26 after counting the merged tree (`ls -d skills/*/` → 26, main alone → 25), not by assuming the branch's own number was still right — main could have added a skill too. Checked there are no `all-25-skills` anchors left anywhere else in the repo.
…analysis Signed-off-by: Abhishek Sharma <abhicse24@gmail.com> # Conflicts: # README.md
Specifying what an operation does when a dependency times out, stalls, or leaves an outcome unknown — at design time, rather than after the incident.
The gap, per CONTRIBUTING rule 4
I checked rather than assumed. A concept scan across all 24 existing skills:
api-and-interface-designapi-and-interface-designThe vocabulary that does exist is almost all in
api-and-interface-design, which owns the request axis: deriving and honouring an idempotency key. The adjacent skills own different jobs —debugging-and-error-recoveryis reactive triage for something already broken, anddoubt-driven-developmentis about assumptions rather than dependency behavior. None of them decides what happens on a timeout before the code is written.I also checked all 56 open PRs: none adds a skill on this topic.
It routes to those siblings rather than restating them — the idempotency implementation to
api-and-interface-design, live diagnosis todebugging-and-error-recovery, telemetry toobservability-and-instrumentation.What it contains
A three-outcome table per boundary, where the third column — unknown — is the one usually left blank, and only three answers are legitimate: make it safe to repeat, make it detectable, or make it impossible. "Retry and hope" is not on the list. Then blast-radius classification, a degradation ladder with measurable triggers, and an injection plan, on the rule that a failure mode you cannot inject cannot be tested.
The eval router shaped this, and that is worth reporting
I named and worded it around
run-evals.jsrather than against it, and the gate caught three real problems in my first draft:modemade it rank Add Claude Code plugin support and fix stale swe-skills references #1 for "Add a dark mode toggle to the settings page".failurestems together withfails, so it outrankeddebugging-and-error-recoveryon that skill's own positive prompt — the exact boundary the skill claims to respect.spec-driven-developmentinstead.Two findings from that which may be useful beyond this PR:
Removing the
NOT for ...clause from the description made things worse, not better. A bag-of-words ranker scores a negative clause exactly like a positive one, soNOT for diagnosing a failure that is already happeningwas injecting diagnose, failure and happening into the vector — the debugging prompt's own vocabulary. That guidance now lives in the body, where it reads to a human and not to the ranker.Adding a 25th skill shifts the IDF corpus and can demote an unrelated skill below the top-3 threshold even when the new skill is nowhere near the prompt. At one point
doubt-driven-developmentdropped to #4 with my skill absent from the top 3 entirely. A shorter, more distinctive description perturbs less, which is why the final one is two sentences rather than five.Verification
Ran the repo's own CI steps locally:
I confirmed the baseline too:
mainwithout this skill is0 error(s), so every collision above was mine to fix rather than something pre-existing I could have shrugged at.Eval case has 3 positive triggers, 2 negative triggers with
owner, and one behavioral eval backed by a real fixture atevals/fixtures/partial-outcome-analysis/checkout-boundaries.md.Note on provenance
An earlier version of this skill exists in a small pack of my own. I wrote it, and this is a deliberate adaptation rather than a copy — the cross-references are repointed at this pack's skills, the framing defers to
api-and-interface-designfor idempotency instead of owning it, and the name and description were rewritten for this repo's router. Mentioning it because you should know where it came from.Happy to fold it into an existing skill instead if you'd rather not add a directory — the content is designed to sit beside
api-and-interface-design, not on top of it.