docs(dev): add adapter authoring knowledge, guidelines, and guides#136
Conversation
Populate dev/{knowledge,guidelines,guides} with adapter-focused developer
documentation: how the sync engine and adapter contract work, the rules an
adapter must follow, and step-by-step procedures to add and test one. Voice
and structure follow the infrahub dev/ conventions.
Trim AGENTS.md's "Adding a New Adapter" list to a pointer at the new guide so
the canonical procedure lives in one place and does not drift.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018tAmHt3KAPa2LdHrQ28S75
Deploying infrahub-sync with
|
| Latest commit: |
c4c25f3
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://99a029ba.infrahub-sync.pages.dev |
| Branch Preview URL: | https://docs-dev-adapter-guides.infrahub-sync.pages.dev |
WalkthroughThis PR adds a complete developer documentation set for infrahub-sync adapters. New knowledge pages cover sync architecture, adapter anatomy (DiffSyncMixin and DiffSyncModelMixin contracts), schema mapping configuration, and incremental sync with cursor tiers and caching. New guideline documents define prescriptive rules for writing and testing adapters. New step-by-step guides walk through adding an adapter end-to-end and writing adapter tests. All existing navigation entry points— 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
The repo recently gained the agentic
dev/structure (constitution, ADR, and stubknowledge/guidelines/guidesREADMEs), but the buckets had no content. There was nosingle place explaining how to write an adapter — the architecture, the rules, and the
procedure — and AGENTS.md's terse 5-step "Adding a New Adapter" list was the only guidance.
Solution
Populate the three
dev/buckets with adapter-focused documentation for humans and agents,following the infrahub
dev/conventions (descriptive knowledge, prescriptive guidelines,procedural guides; hub-and-spoke cross-linking):
DiffSyncMixin/DiffSyncModelMixincontract), schema mapping, and incremental sync & cache.
AGENTS.md's "Adding a New Adapter" section is trimmed to a pointer at
dev/guides/adding-an-adapter.md, so the canonical procedure lives in one place and does notdrift.
Content is grounded in the actual code (the mixin contract, the netbox adapter, the
genericrestapi→peeringmanagerbase pattern, theexamples/custom_adapterworked example,and the existing
tests/adapters/patterns). No source-code changes and no user-visible CLIor config changes. markdownlint is clean and all relative cross-links resolve.
Before / after — AGENTS.md "Adding a New Adapter"
dev/guides/adding-an-adapter.mdplus links to thedev/referenceset, keeping the read-only-
list/diff-before-syncrule inline.Summary by CodeRabbit