skills/smith-1980-contract-net-protocol/SKILL.md
Distributed task allocation protocol where agents negotiate task assignments through contract bidding
npx skillsauth add curiositech/windags-skills smith-1980-contract-net-protocolInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Given: Agent state S, Goal G, Available actions A
IF satisfiability_check(S, G) == TRUE
├── IF current_knowledge_sufficient(S, G)
│ └── Execute planned action
├── ELSE IF gather_info_viable(S, A)
│ ├── Identify minimum vision set expansion needed
│ ├── Request targeted information from other agents
│ └── Update Kripke model with new information
│ └── Re-evaluate satisfiability_check(S, G)
└── ELSE
└── Reconfigure agent positions/permissions to satisfy G
ELSE IF satisfiability_check(S, G) == FALSE
├── IF goal_relaxation_acceptable()
│ └── Modify G to achievable subset
└── ELSE
└── Abort and escalate to human operator
ELSE IF satisfiability_check(S, G) == UNKNOWN
├── Attempt distributed reasoning with peer agents
├── IF still UNKNOWN after coordination
│ └── Escalate to centralized knowledge computation
└── ELSE proceed with satisfiability branch above
When coordination attempt fails between agents A and B:
IF agents had same information but different actions
├── Check for common knowledge gap
│ ├── Was information publicly announced? → Use public broadcast
│ └── Was announcement verified received? → Add confirmation protocol
└── Check for conflicting vision sets → Resolve perceptual boundaries
IF agents had different information
├── Map each agent's vision set
├── Identify which agent has authoritative view
├── Update uninformed agent's Kripke model
└── Re-attempt coordination
IF coordination succeeds but action fails
├── Epistemic goal was wrong, not coordination
└── Revise knowledge requirements for this task type
Symptom: Agent claims to "know" something based on incomplete information Detection Rule: If agent acts on belief X but cannot rule out scenarios where ¬X, it has false knowledge Fix: Map agent's vision set; expand perceptual boundaries or add verification step before action
Symptom: System assumes coordination after broadcasting message to all agents Detection Rule: If coordination fails despite "shared" information, check if agents know that others received the message Fix: Replace broadcast with public announcement protocol; verify common knowledge establishment
Symptom: Agents follow procedures correctly but system fails to achieve intended outcome Detection Rule: If tasks complete successfully but higher-level goal fails, procedures were specified without epistemic foundation Fix: Rewrite specifications as "Agent X must know Y before doing Z" instead of procedural steps
Symptom: System uses central knowledge computation but claims to be "distributed" Detection Rule: If any single point of failure can corrupt all agents' knowledge states Fix: Either accept centralized architecture with honest trade-off documentation, or redesign for true distributed epistemic reasoning
Symptom: Agent assigned task requiring information outside its perceptual boundaries Detection Rule: If agent cannot distinguish scenarios relevant to its assigned task Fix: Either expand agent's vision set or reassign task to agent with appropriate perceptual access
Scenario: Three surveillance agents (A1, A2, A3) monitoring area. A2's camera malfunctions, creating coverage gap.
Initial State: A1 knows east sector clear, A3 knows west sector clear, A2 reports nothing (due to malfunction) Goal: Verify entire area is secure before allowing human entry
Decision Process:
Expert Insight: Novice would wait for A2 to recover or manually check the area. Expert recognizes this as satisfiability problem and solves via reconfiguration.
Scenario: Financial trading agents must execute synchronized trades across markets
Initial Attempt: Central system broadcasts "execute trades at 14:30" to all agents Failure: Some agents execute, others don't, causing market position mismatch
Epistemic Analysis:
Solution:
Task completion requires ALL conditions satisfied:
This skill should NOT be used for:
Delegate to other skills when:
Use this skill specifically when:
tools
Building resilient distributed systems with circuit breakers, retries with full-jitter exponential backoff, retry budgets (per-request 3-attempt + per-client 10% ratio per Google SRE), deadline propagation, and the cascading-failure math (4 layers × 3 retries = 64x amplification). Grounded in Resilience4j, Microsoft Cloud Patterns, AWS Architecture Blog (Marc Brooker), and Google SRE Book.
testing
Designing HTTP cache headers that work correctly across browsers, CDNs, and shared proxies — `Cache-Control` directives per RFC 9111, `stale-while-revalidate` and `stale-if-error` per RFC 5861, the Vary header for varying responses, and surrogate keys for tag-based purging. Grounded in IETF RFCs and Cloudflare/Fastly docs.
development
Use when designing or fixing a Content Security Policy on a real site, choosing between nonce-based and hash-based CSP, adding strict-dynamic, debugging "Refused to execute inline script" errors, deploying CSP in report-only mode first, configuring report-to / report-uri, or auditing an existing policy for unsafe-inline / unsafe-eval / wildcards. Triggers: "CSP blocks legitimate inline script", strict-dynamic, nonce-{RANDOM}, sha256-{HASH}, object-src none, base-uri none, frame-ancestors, Trusted Types, X-Content-Security-Policy obsolete, report-only vs enforced. NOT for general HTTP security headers (HSTS, COOP/COEP), Trusted Types deep dive, CORS configuration, or building a WAF.
tools
Choosing and operating an HTTP API versioning strategy that doesn't break clients — Stripe's date-based pinned versions, the Deprecation/Sunset header pair (RFC 9745 + RFC 8594), URI vs header vs media-type approaches, and the version-transformer pattern. Grounded in Stripe's published architecture and IETF RFCs.