reactive-integration-design
Skill2 starsChanged 6 months agoMITView on GitHub
Observe facts, not promises — prefer kernel/runtime event streams (docker events, inotify, K8s watch, fanotify, journald) over application-level webhooks/callbacks. Use when designing reactive integrations to external system events, building event-driven architectures, and avoiding silent integration failures across version upgrades.
In this repository30 other files it gives its agents.
- adr-spec-gateSkill
- agent-continuity-loopSkill
- agent-flywheelSkill
- agent-runtime-paritySkill
- business-guardrailsSkill
- compact-instructionsSkill
- debug-protocolSkill
- dns-and-whois-toolsSkill
- docs-as-codeSkill
- engineering-standardsSkill
- excellence-no-intermediatesSkill
- git-pr-rulesSkill
- hooks-for-enforcementSkill
- hooks-multi-tool-paritySkill
- iac-first-commitSkill
- impact-metrics-gateSkill
- large-payload-completenessSkill
- ledger-auto-updatesSkill
- llm-model-selectionSkill
- local-service-autostartSkill
- multi-phase-sessionSkill
- new-projectSkill
- notion-apiSkill
- notion-batch-patternSkill
- observability-when-to-addSkill
- permanent-learning-protocolSkill
- progress-md-businessSkill
- secure-secret-inputSkill
- tokens-taxonomySkill
- version-bump-rulesSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 10 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
When designing a reactive integration to an external system event (container deployment, Kubernetes state change, queue message, OS-level …
- Distinctive: line 15
When the application upgrades, the webhook payload format may change without notice.
- Distinctive: line 16
When the application loses permissions or encounters errors, events get dropped without notification.
- Distinctive: line 24
Container deployment monitoring: Instead of polling the Kubernetes API every N seconds or relying on a platform's webhook delivery, consume …
- Very specific: line 25
File system integration: Instead of consuming an application's "file changed" callback, use inotify (Linux) or fanotify (Linux, more …
- Very specific: line 26
Container lifecycle: Instead of relying on a container orchestration platform's webhook, consume docker events directly.
- Very specific: line 27
Journal events: Instead of polling application logs via HTTP API, follow journald on the host.
- Distinctive: line 31
When designing a reactive integration:
- Distinctive: line 34
If a primitive exists: use it. Build around it. It will outlast application version changes.
- Distinctive: line 38
Have a fallback: If the webhook fails or gets behind, have a secondary polling mechanism (even if inefficient) so the integration can …
- Distinctive: line 50
When you choose a primitive event stream:
- Distinctive: line 51
It should survive application upgrades unchanged: If the application updates tomorrow, the event stream should still work without code …
- Distinctive: line 53
It should be version-stable: If there is a version number (e.g., Kubernetes API version), it should be explicitly bumped if the contract …
- Distinctive: line 65
Applies to: all AI agents, all projects, all reactive integration design tasks.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Observe Facts, Not Promises — Reactive Integration Design
When designing a reactive integration to an external system event (container deployment, Kubernetes state change, queue message, OS-level file change), prefer primitive event streams (kernel-level or runtime-level — docker events, inotify, Kubernetes watch API, fanotify, journald) over application-level callbacks (webhooks, SDK callbacks, HTTP API polling).
Why This Matters
Primitive events describe facts. They are generated by the kernel or runtime and represent something that actually occurred in the system. The contract between your integration and the event source is stable across versions because it is enforced at the infrastructure layer, not the application layer.
Webhooks describe promises. They are contracts the application makes to notify you when something happens. Promises break silently:
- When the application upgrades, the webhook payload format may change without notice.
- When the application loses permissions or encounters errors, events get dropped without notification.
- Under high load, the application may batch, skip, or defer webhook deliveries.
- The webhook endpoint itself may be removed or behavior changed without backward compatibility.
The fragility gap: a webhook depends on the application continuing to implement and maintain the notification contract. A primitive event stream depends only on the infrastructure remaining functional—which it must, or the entire system fails anyway.
Examples
- Container deployment monitoring: Instead of polling the Kubernetes API every N seconds or relying on a platform's webhook delivery, consume the Kubernetes watch API directly. The watch API is a runtime primitive; a platform's webhook system is an application-level contract that can change.
- File system integration: Instead of consuming an application's "file changed" callback, use
inotify(Linux) orfanotify(Linux, more recent) to observe kernel-level file events. These are OS primitives. - Container lifecycle: Instead of relying on a container orchestration platform's webhook, consume
docker eventsdirectly.docker eventsis a runtime primitive exposed by the Docker daemon. - Journal events: Instead of polling application logs via HTTP API, follow
journaldon the host. Journal is kernel-level infrastructure.
How to Apply
When designing a reactive integration:
- First question: "What is the most primitive event that captures this requirement?" Primitive means kernel-level, runtime-level, or OS-level.
- If a primitive exists: use it. Build around it. It will outlast application version changes.
- If no primitive exists: then use webhooks. But when you do:
- Version the payload contract. Expect the webhook payload to change and plan for breaking changes (add a
versionfield, include atimestamp, allow optional fields). - Monitor the integration. Webhooks are inherently fragile; log every delivery attempt, every missing event, every parse error.
- Have a fallback. If the webhook fails or gets behind, have a secondary polling mechanism (even if inefficient) so the integration can self-heal.
- Document the dependency. The webhook format is not a guarantee—it is a snapshot of the application's current behavior. Document what behavior the integration depends on and what breaks if it changes.
- Version the payload contract. Expect the webhook payload to change and plan for breaking changes (add a
Anti-Patterns
- Relying exclusively on a webhook when a primitive event stream exists.
- Assuming webhook payload format is stable across application versions without explicit guarantees from the vendor.
- Building integration logic that silently fails if a webhook is dropped or delayed.
- Polling an application's HTTP API every N seconds when a primitive event exists at a lower layer.
Testing and Validation
When you choose a primitive event stream:
- It should survive application upgrades unchanged. If the application updates tomorrow, the event stream should still work without code changes.
- It should have explicit documentation. Primitive events are documented as part of the kernel, OS, or runtime, not as a bonus feature of the application.
- It should be version-stable. If there is a version number (e.g., Kubernetes API version), it should be explicitly bumped if the contract changes, not silently changed in a minor release.
References
- Kubernetes Watch API: observing resource changes at the runtime level
- Docker Events API: kernel-level container state changes
- Linux
inotify/fanotify: kernel-level file system event streams - systemd
journald: kernel and service logs as a primitive journal - Message queue primitives (RabbitMQ, Kafka, etc.): consume from the queue directly rather than relying on the producer to re-emit events
Applies to: all AI agents, all projects, all reactive integration design tasks.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

