Skip to content

docs(dev): add adapter authoring knowledge, guidelines, and guides#136

Merged
BeArchiTek merged 1 commit into
mainfrom
docs/dev-adapter-guides
Jun 24, 2026
Merged

docs(dev): add adapter authoring knowledge, guidelines, and guides#136
BeArchiTek merged 1 commit into
mainfrom
docs/dev-adapter-guides

Conversation

@BeArchiTek

@BeArchiTek BeArchiTek commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Problem

The repo recently gained the agentic dev/ structure (constitution, ADR, and stub
knowledge/guidelines/guides READMEs), but the buckets had no content. There was no
single 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):

  • knowledge/ — sync architecture, adapter anatomy (the DiffSyncMixin / DiffSyncModelMixin
    contract), schema mapping, and incremental sync & cache.
  • guidelines/ — rules for writing and testing an adapter.
  • guides/ — step-by-step procedures for adding and testing an adapter.

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 not
drift.

Content is grounded in the actual code (the mixin contract, the netbox adapter, the
genericrestapipeeringmanager base pattern, the examples/custom_adapter worked example,
and the existing tests/adapters/ patterns). No source-code changes and no user-visible CLI
or config changes. markdownlint is clean and all relative cross-links resolve.

Before / after — AGENTS.md "Adding a New Adapter"

  • Before: a 5-step inline list.
  • After: a pointer to dev/guides/adding-an-adapter.md plus links to the dev/ reference
    set, keeping the read-only-list/diff-before-sync rule inline.

Summary by CodeRabbit

  • Documentation
    • Expanded the adapter documentation with new, structured guides and reference pages.
    • Added end-to-end instructions for building adapters, writing tests, and understanding adapter structure, sync architecture, schema mapping, and incremental/cached sync behavior.
    • Improved documentation navigation with clearer indexes and links across adapter-related materials.
    • Updated existing adapter setup guidance to point to the full guide while keeping key safety rules intact.

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
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deploying infrahub-sync with  Cloudflare Pages  Cloudflare Pages

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

View logs

@BeArchiTek BeArchiTek added type/documentation Improvements or additions to documentation ci/skip-changelog This will not be added to release notes labels Jun 24, 2026
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This 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—dev/knowledge/README.md, dev/guidelines/README.md, dev/guides/README.md, and AGENTS.md—are updated with structured indexes linking to the new content.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: new adapter-authoring documentation under dev knowledge, guidelines, and guides.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@BeArchiTek BeArchiTek merged commit 94bd7ce into main Jun 24, 2026
12 of 13 checks passed
@BeArchiTek BeArchiTek deleted the docs/dev-adapter-guides branch June 24, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/skip-changelog This will not be added to release notes type/documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant