/fde-platform:integration-adapterfrom fde-platform
Builds a resilient client for undocumented or misbehaving external systems using contract discovery from observed traffic, defensive parsing, timeouts, retries, circuit-breaking, and a test fake. Use when consuming legacy, mainframe, SOAP, flat-file, or partner interfaces where documentation is unreliable.
Ships in fde-platform. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Talking to something you can't change.
Enterprise integration is mostly against systems that are undocumented, documented incorrectly, owned by someone else, or all three. A mainframe interface described by a Word document from 2014. A partner SOAP endpoint whose WSDL doesn't match what it returns. A flat file whose format is defined by the code that writes it.
Two assumptions make this work, and both feel pessimistic until you've been burned:
The documentation is wrong. Not maliciously — it described the system accurately once. Observed behavior beats documentation every time, and where they disagree, the documentation is the thing that's out of date.
The interface will misbehave. It will time out, return malformed responses, return HTTP 200 with an error in the body, be down for maintenance without notice, and change without telling you. An adapter that assumes good behavior fails in production in ways that are hard to diagnose because the failure is somewhere you can't see.
contract-designtrace-the-flowResolve <workspace> before reading or writing artifacts: use FDE_WORKSPACE if set (report an unavailable explicit path rather than falling back), otherwise the charter's recorded Location (look in .fde/ and ../*-fde/), then an existing .fde/ or ../<repo>-fde/. If none exists, run core fde-orient; do not create a second workspace. All artifact paths below use that location. Follow core workspace conventions for headers; preserve existing sections when appending.
<workspace>/02-system-map.md — where this integration sits<workspace>/03b-nfrs.md — what data may cross the boundaryBefore reading any specification, find code in the organization that already talks to this system. It encodes years of accumulated knowledge about the interface's actual behavior — every workaround in it is a bug someone hit.
# Search for the hostname, service name, or a distinctive field
grep -rn "<hostname>\|<ServiceName>\|<distinctive-field>" --include="*.*" . | head -20
Read them specifically for the workarounds: retries around a particular call, a field parsed defensively, a sleep, a comment explaining something strange. Each one is a documented failure mode, and reproducing them is cheaper than rediscovering them.
git-archaeology on those workarounds usually tells you exactly what incident produced them.
Where you can call the system — a test environment, a sandbox, or a recorded sample — capture actual traffic and compare it to whatever spec exists.
You're looking for the divergences that will bite:
"Y"/"N"Record what you observed and when, with samples. That record is the real contract, and it's more valuable than the spec to whoever maintains this next.
The whole point of the pattern. All contact with the foreign system goes through one component, exposing an interface shaped for your domain, not theirs.
That boundary is what lets you:
Do not let their data structures leak past the adapter. If their CUST_REC_TYPE_CD reaches your domain layer, you've coupled your system to theirs and every one of their changes becomes a change in your business logic.
Assume every response is malformed until proven otherwise.
Log enough to diagnose, redacted. When this breaks at 3am the person debugging needs the request and response, and they must not contain card numbers or personal data. Decide the redaction up front; see security-compliance-check.
Every parameter is a decision, and the defaults are almost always wrong:
nfr-baseline should have specified it.Slow is worse than down, and it's the case people don't test. nfr-validation covers testing it.
Build a fake implementation of the adapter's interface that behaves like the real system — including its bad behavior. It should be able to return malformed responses, time out, and produce the 200-with-error case.
A fake beats a mock here for the same reason as in characterization-tests: mocks assert interactions and couple tests to the current implementation, while a fake supplies behavior and lets you exercise the failure paths that matter.
Record real responses as fixtures — redacted — so the fake returns shapes you actually observed rather than shapes you imagined.
The observed contract is the most valuable artifact here. Where it disagrees with their documentation, record both and say which you built against.
This is what makes the integration maintainable after you leave, and it's the thing that reliably doesn't exist for the integrations you inherited.
Write to <workspace>/traces/<external-system>.md:
# Integration — <system>
**Engagement:** <name> · **Author:** FDE · **Date:** <YYYY-MM-DD>
**Their docs:** <ref, date> · **Observed:** <environment>, <dates>
**Confidence:** <observed vs. documented-only>
**Status:** draft
**Source revision:** <repo>@<short SHA>, or "no repository yet"
## Interface
**Protocol:** SOAP 1.1 over HTTPS · **Auth:** mutual TLS, cert expires <date> ⚠️
**Owner:** <team / vendor> · **Contact:** <how> · **SLA:** <if any>
## Observed vs documented
| Aspect | Documented | Observed | Built against |
|---|---|---|---|
| `amount` | decimal | **string, 2dp, comma separator in some locales** | observed |
| `status` | 3 values | **5 values** — 2 undocumented | observed |
| Error | HTTP 500 | **HTTP 200, `<fault>` in body** | observed |
| Missing customer | 404 | **200 with empty result set** | observed |
## Failure modes seen
| Mode | Frequency | Handling |
|---|---|---|
| Timeout > 30s | ~1/1000 | 10s timeout, circuit breaker |
| Malformed XML | rare | Parse failure → explicit error, payload logged redacted |
| Maintenance window | Sundays 02:00–04:00, **unannounced** | Circuit breaker; batch reschedule |
## Resilience posture
| Parameter | Value | Why |
|---|---|---|
| Timeout | 10s | p99 observed 3.2s |
| Retry | 2×, reads only | **No idempotency key offered — writes not retried** |
| Backoff | exponential + jitter | |
| Circuit breaker | 5 failures / 30s → open 60s | |
| Fallback | cached rate, max 24h stale | Per `03b-nfrs.md` N5 |
## Adapter
**Interface:** `FxRateProvider` — our domain, not theirs
**Fake:** `FakeFxRateProvider`, 14 recorded fixtures incl. 4 failure cases
**Their types do not escape:** `[confirmed: FxAdapter:88 maps to domain]`
## Watch items
- Client cert expires <date> — **renewal owner: <name>**
- Undocumented status values may grow; unknown values map to `UNKNOWN` and alert
Trusting the documentation. It was accurate once. Observed behavior wins.
Letting their types into your domain. Every change of theirs becomes a change in your business logic.
No timeout. The most common way an integration takes down the calling system.
Retrying non-idempotent calls. A duplicate charge is not a transient failure.
Fixed-interval retry. Instances synchronize and hammer a recovering system.
Only handling HTTP-level errors. 200-with-error-in-body is extremely common in enterprise interfaces.
Mocking instead of faking. You never exercise the failure paths, which are the ones that matter.
Logging the raw payload. That's how card numbers reach your logs. Redact by design.
Not recording the observed contract. The single most valuable artifact, and the one that never exists for integrations you inherit.
What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/contract-designDesign an API, event, or schema contract with compatibility as the primary concern - versioning strategy, backward compatibility, migration path for existing consumers, and failure semantics - plus a consumer impact list. Use when creating or changing anything that crosses a team boundary, when adding a field to a published response or event, when consumers exist outside your repository, or when someone asks how to version an API. Once consumers exist you do not control, the contract stops being a design problem and becomes a coordination problem./cots-configurationWork on a vendor platform where the deliverable is configuration rather than code - SAP, Salesforce, ServiceNow, Workday, Dynamics, Guidewire and similar - where the binding constraint is the vendor upgrade path, config lives in the platform rather than in git, and the right answer is often not to build it. Use for package implementation engagements, when customizing a vendor product, when asked whether something can be configured or must be coded, or when a platform upgrade is threatened by existing customization. Engineers new to COTS reliably misjudge this.npx claudepluginhub rpraharaj/forward-deployed-engineer --plugin fde-platformOther plugins' skills for the same job