hier_config AGENTS.md

AGENTS.md instructions for netdevops/hier_config, covering hierconfig — agent & contributor guide, project overview, build & test commands, full lint + test suite (what ci runs) and tests only (95% coverage required).

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/netdevops/hier_config/agents-md
Clone the repo
git clone --depth 1 https://github.com/netdevops/hier_config

Made for: Codex, OpenCode.

Per session 1,385 This file is loaded in full into every session.
When invoked 1,385 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin unknown No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01385 $0.01385
Opus 5 $0.00692 $0.00692
Sonnet 5 $0.00277 $0.00277
Haiku 4.5 $0.00138 $0.00138

Measured today against content hash f817226e9c6d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hier_config AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 81 lines

How it starts

The opening of the file, as written. The whole thing — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.

hier_config — Agent & Contributor Guide

This file is the canonical quick reference for AI coding agents (and humans) working in this repository. The deep documentation lives in docs/ and on Read the Docs; this file is the index.

Project Overview

hier_config is a Python library that compares network device configurations (running vs intended) and generates minimal remediation commands. It parses config text into hierarchical trees and computes diffs respecting vendor-specific syntax rules. Runtime dependencies are deliberately minimal (pydantic only).

Build & Test Commands

All commands use poetry (not pip):

# Full lint + test suite (what CI runs)
poetry run ./scripts/build.py lint-and-test

# Lint only (ruff, mypy, pyright, pylint, yamllint, flynt — run in parallel)
poetry run ./scripts/build.py lint

# Tests only (95% coverage required)
poetry run ./scripts/build.py pytest --coverage

# Run a single test
poetry run pytest tests/test_driver_cisco_xr.py::test_name -v

# Run a single test file
poetry run pytest tests/test_driver_cisco_xr.py -v

# Auto-fix formatting
poetry run ruff format hier_config tests scripts

# Validate docs (required if docs/ or mkdocs.yml changed)
poetry run mkdocs build --strict

Architecture in Brief

Three-layer design — full detail in docs/dev/architecture.md:

  • Tree (base.py, root.py, child.py, children.py): HConfig root and HConfigChild nodes; key operations config_to_get_to(), future(), unified_diff(), dump_simple().
  • Driver (platforms/): each platform subclasses HConfigDriverBase and overrides _instantiate_rules() returning HConfigDriverRules — typed, frozen Pydantic rule models matched against config lineage via MatchRule tuples.
  • Workflow (workflows.py, reporting.py): WorkflowRemediation exposes remediation_config / rollback_config; constructors live in constructors.py (get_hconfig(), get_hconfig_fast_load(), get_hconfig_driver()).

Read the full file on GitHub · 81 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 81 lines · 1,385 tokens per session scan A f817226e9c6d

Subscribe to this mod's changes

hier_config AGENTS.md is an instructions file published in the GitHub repository netdevops/hier_config (150 stars, last pushed 5d ago), licensed MIT. It adds 1,385 tokens to every session, about $0.0069 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.