Skip to content

feat(pstack): add principle-bound-every-external-call - #722

Open
patote85 wants to merge 1 commit into
cursor:mainfrom
patote85:feat/principle-bound-every-external-call
Open

patote85 wants to merge 1 commit into
cursor:mainfrom
patote85:feat/principle-bound-every-external-call

Conversation

@patote85

Copy link
Copy Markdown

Why

pstack covers what happens when an operation runs twice (make-operations-idempotent), but no principle says what code should do when a dependency hangs, fails, or keeps failing. Without that, agents write calls with library-default timeouts, retry everything at several layers, and drop or block on poison messages. This adds the missing principle and pairs it with the idempotency one: a retry is only safe when the operation converges.

What changed

  • New pstack/skills/principle-bound-every-external-call/SKILL.md, in the same shape as the other principles (intro, Why, The idea, The test). It asks for four bounds on every external call: a deadline, a retry policy (transient errors only, idempotent operations only, exponential backoff with jitter, capped, at one layer), a dead-letter path for poison messages, and a circuit breaker.
  • Registered it in the poteto-mode principle index (Architecture, right after Make Operations Idempotent), the README table, and the guide's principles list.
  • Updated the principle counts from 24 to 25 in pstack/README.md, docs/guide/08-principles.md, and docs/guide/README.md.
  • Regenerated harness/pstack/claude-code with scripts/generate-pstack-harness-trees.mjs.

Scope

Docs and skill text only. No command, playbook, or script behavior changes. The principle is generic and names no cloud, vendor, or library.

Tradeoffs

The four bounds could live as a section inside make-operations-idempotent. I kept them separate because the triggers differ: idempotency is about repeated runs of your own operation, and this is about calls into something you don't control. The test section links the two.

Blast Radius

Adds one entry to the poteto-mode index, which loads on every poteto-mode run, so it adds one line of context there. No other skill references change.

Verification

  • node scripts/check-pstack-docs.mjs: tree reports 25 principles, 0 problems.
  • node scripts/generate-pstack-harness-trees.mjs --check: harness up to date.
  • node scripts/validate-plugins.mjs: all plugins validated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant