Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
Empty file added .agents/skills/.gitkeep
Empty file.
2 changes: 1 addition & 1 deletion .claude/commands
2 changes: 1 addition & 1 deletion .claude/skills
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ jobs:
globs: |
**/*.{md,mdx}
!changelog/*.md
!.agents/commands/**
!.agents/skills/**
!.claude/commands/**
!.claude/skills/**
!dev/commands/**
Expand Down
18 changes: 3 additions & 15 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Infrahub Python SDK - async/sync client for Infrahub infrastructure management.

## Product context

The SDK is the foundational library for programmatically interacting with Infrahub. It abstracts away the underlying API so developers can work with infrastructure data using native Python objects.
Foundational library for programmatically interacting with Infrahub. Abstracts the underlying API so developers work with infrastructure data as native Python objects (built-in auth, batching, caching, tracking).

**Primary audience:** Network automation engineers and software developers.

Expand All @@ -14,8 +14,6 @@ The SDK is the foundational library for programmatically interacting with Infrah
- **Integrate with external systems** — Query and sync data between Infrahub and existing tools. `infrahubctl` and the Infrahub Ansible collection both use this SDK internally.
- **Build custom applications** — Use Infrahub as a data backend for Python projects entirely outside of Infrahub's own pipeline.

**Why the SDK over direct API calls:** eliminates the need to learn Infrahub's API structure, provides Python-native interfaces with built-in auth, adds advanced capabilities (batching, caching, tracking), and reduces boilerplate.

## Commands

```bash
Expand Down Expand Up @@ -57,9 +55,7 @@ infrahub_sdk/

## Markdown style

When editing `.md` or `.mdx` files, run `uv run invoke lint-docs` before committing.

Key rules:
When editing `.md` or `.mdx` files (`uv run invoke lint-docs` enforces these):

- Use `text` language for directory structure code blocks
- Add blank lines before and after lists
Expand All @@ -71,7 +67,7 @@ Key rules:

- Run `uv run invoke format lint-code` before committing Python code
- Run `uv run invoke docs-generate` after creating, modifying or deleting CLI commands, SDK config, or Python docstrings
- Run markdownlint before committing markdown changes
- Run `uv run invoke lint-docs` before committing markdown changes
- Follow async/sync dual pattern for new features
- Use type hints on all function signatures

Expand All @@ -87,14 +83,6 @@ Key rules:
- Modify generated code (protocols.py)
- Bypass type checking without justification

## Knowledge base

Deep-dive docs on architecture and workflows live in `dev/knowledge/`. Read these before making changes to the areas they cover.

- [dev/knowledge/cli-architecture.md](dev/knowledge/cli-architecture.md) - CLI command hierarchy and design rules
- [dev/knowledge/cli-design-principles.md](dev/knowledge/cli-design-principles.md) - Principles for writing CLI commands (no pre-validation, phrasing, etc.)
- [dev/knowledge/doc-generation.md](dev/knowledge/doc-generation.md) - How docs are auto-generated from code

## Subdirectory guides

- [docs/AGENTS.md](docs/AGENTS.md) - Documentation (Docusaurus)
Expand Down
4 changes: 4 additions & 0 deletions dev/adr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Decision Records (ADRs)

MADR-format decision records. Name each file `nnnn-title.md`: a zero-padded 4-digit
sequence and a lowercase kebab-case title, no `adr-` prefix (e.g. `0001-use-uv.md`).
3 changes: 3 additions & 0 deletions dev/guidelines/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Guidelines

Conventions and standards.
3 changes: 3 additions & 0 deletions dev/guides/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Guides

How-to documentation.
3 changes: 3 additions & 0 deletions dev/knowledge/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Knowledge

Domain knowledge and glossary, loaded on demand. Houses `CONTEXT.md`.
6 changes: 3 additions & 3 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.