From f69bba2bf165d505e1365564dc2d4cc1b79f6c64 Mon Sep 17 00:00:00 2001 From: Damien Date: Thu, 12 Feb 2026 11:19:23 +0100 Subject: [PATCH] Create CLAUDE.md --- CLAUDE.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..f974c3a --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,35 @@ +# Claude Code Instructions — Schema Refinement + +## Project Context +This is a fabric-orchestrator project managing Arista EVPN-VXLAN fabrics. +Branch: `feature/41-infrahub-schema` +Schema files are in `schemas/` directory (Infrahub YAML format). + +## Reference Topology (from overlaid.net) +- 2 spines (AS 65000), 8 leafs in 4 MLAG pairs (AS 65001-65004) +- Loopback0: BGP router-id, Loopback1: shared VTEP IP per MLAG pair +- VLANs 4090/4091: MLAG peering with trunk groups +- EVPN overlay via eBGP multihop on loopbacks +- L2VXLAN (Type-2) and L3VXLAN (Type-5) with VRFs + +## Infrahub Schema Rules +1. `human_friendly_id` attributes MUST have `unique: true` +2. If human_friendly_id needs to be scoped per-device, traverse Parent + relationships: `parent_rel__parent_attr__value` +3. Parent relationships need `optional: false` explicitly +4. Self-referencing relationships need `direction: outbound` +5. Multiple relationships to same peer type need unique `identifier` +6. Validate with: `infrahubctl schema check schemas/` + +## Commit Convention +- Reference issue: `fix(schema): description — refs #41` +- One logical change per commit +- Run schema validation before committing + +## Files +- `schemas/base.yml` — Device, Interfaces, IPAddress +- `schemas/bgp.yml` — AS, BGPRouterConfig, PeerGroup, Session, AF +- `schemas/vlan_vxlan.yml` — VLAN, VNI, VTEP, VlanVniMapping, EVPN +- `schemas/vrf.yml` — VRF, RouteTarget, VRFDeviceAssignment +- `schemas/mlag.yml` — MlagDomain, MlagPeerConfig, MlagInterface +- `schemas/extensions.yml` — UnderlayLink, HostConnection, FabricSettings