/fff:contract-enforcementfrom fff
Anchors mocks to verifiable contracts via typed interfaces, adapter tests, OpenAPI schema generation, and consumer-driven contract testing. For hexagonal architecture and cross-service boundaries.
Ships in fff. 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.
Reference rulebook (L2+). Loaded as context by work-issue and plan-chat when ports are involved. Not invoked as a tool.
Every mock is a claim about how a dependency behaves. That claim can become a lie. Anchor every mock to a verifiable contract.
If you mock a dependency, there must be a corresponding test that proves the real dependency behaves the way your mock claims. No exceptions.
The ports ARE the contracts. This is free when done right.
The hexagonal architecture makes this natural. The port is the single source of truth. Mocks are typed against it. Adapters implement it. Both sides are tested against the same contract.
When a FastAPI backend serves a TypeScript frontend, types drift. Schema generation prevents it.
1. Pydantic models define the source of truth
2. FastAPI's app.openapi() exports the OpenAPI schema
3. openapi-typescript generates TypeScript types from the schema
4. Frontend imports generated types
If the backend changes shape, the frontend won't compile. The contract is enforced at build time, not at runtime.
CI check:
python scripts/export_openapi.py
npx openapi-typescript openapi.json -o frontend/src/api/types.ts
git diff --exit-code frontend/src/api/types.ts
If the generated types changed without being regenerated and committed, the build fails. No silent drift.
When you don't control both sides, or services live in separate repos with separate teams, use Pact for consumer-driven contract testing.
This inverts the usual integration test model. Instead of the provider defining the API and hoping consumers adapt, consumers declare their needs and the provider proves it meets them.
Contract types must be regenerated and committed in every PR that changes a port interface. Gate 4 (Maintainability) enforces this. A PR that changes a Pydantic model without updating the generated TypeScript types fails the build.
The contract is the boundary. The boundary is tested from both sides. Neither side can change without the other knowing.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub zerotechdebt/ffflow --plugin fff38 skills in this plugin
/adopt-ffflowEnd-to-end onboarding for a new FFFlow project. Runs init-ffflow, stack-init, then hands off to plan-roadmap to phase out the work (greenfield or brownfield — roadmap figures out the right per-phase entry point). Use `--ui` to adopt FFFlow's view-layer-purity structure (the frontend sibling of hexagonal) on an already-adopted project./auditRun the FFFlow keep-honest auditors against this project. Coordinator with per-type cartridges (CLAUDE.md freshness, spec drift, characterization tests, architecture conformance, complexity/refactor signals, and L3 RID traceability). Use --type to target one; --plan to convert findings into work./autopilotMeta-skill that wraps any interactive skill for unattended execution. Reads project context to stand in for the user on routine decisions, with a decision log./characterizeFor an unspec'd codebase, walk it module-by-module to extract an evergreen spec (committed immediately) and produce a plan for characterization-test backfill./ci-gatesGitHub Actions workflow templates for FFFlow projects — runs level-appropriate audits and quality gates as PR checks./component-driven-uiView-layer purity — presentational vs. connected components, the atoms→molecules→organisms→layouts ladder, story-as-vignette doctrine, design tokens, and the decompose→story→test→integrate ordering. The frontend sibling of hexagonal-architecture. L1+ reference rulebook.