Skip to content

Fix documentation, agent-instruction, and changelog gaps - #297

Merged
jtdub merged 4 commits into
nextfrom
docs/gap-remediation
Aug 5, 2026
Merged

Fix documentation, agent-instruction, and changelog gaps#297
jtdub merged 4 commits into
nextfrom
docs/gap-remediation

Conversation

@jtdub

@jtdub jtdub commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes the gaps found in a full audit of the documentation and agent-facing instruction files against the code on next. Four commits, one per surface:

Agent instruction files (c222257) — AGENTS.md/copilot-instructions/skills contradicted or omitted repo reality:

  • Hard Rule Several Updates #1 ("immutable collections only") contradicted the deliberate list[...] fields on HConfigDriverRules (Stable public identities for built-in post-load callbacks #286 removal-by-identity); an agent following it literally would break that public API. The carve-out is now documented in AGENTS.md, copilot-instructions, code-style.md, and both affected skills.
  • The hier-config-review skill diffed against master, which on any next-based branch pulls in all of v4 — it now uses the merge-base with the actual base branch.
  • AGENTS.md had no branching strategy at all (only CLAUDE.md did, so non-Claude agents would target master for v4 work). Also added: the CI Python matrix (3.10–3.14), the unconditional docs --strict job and its separate docs/requirements.txt, the formats/plugins/constructors modules, future_with_report(), and the v4: Canonicalize registry platform keys before 4.0.0 final #284/Canonicalize registry keys to uppercase platform names #295 registry canonicalization (including the Platform.X.name key requirement in the new-driver skill).
  • CONTRIBUTING.md referenced a nonexistent test file, omitted yamllint/flynt, the changelog requirement, and branch-base guidance.

User docs + README (ff7007b) — five documented examples were verifiably broken (nonexistent fixture in getting-started, tags.md filtering on a tag its fixture never defines, a nonexistent delete_child() method, wrong config-view outputs, six missing JunOS output lines). All replacement outputs were produced by running the snippets against the real fixtures. Also: --pre in the README install (its Quick Start uses the v4-only API), de-pinned the drifted 4.0.0b1 from install.md, propagated Aruba AOS-CX into architecture/config-view docs, corrected the HConfigViewBase abstract-member lists, added the formats module / Future Config section / resolve_driver / view data models / all nine built-in post-load callbacks to the API reference, five new glossary entries, and pointed the legacy utilities.md redirects at admin/rules-from-files.md.

CHANGELOG (480d04d) — [Unreleased] had duplicate Added/Changed/Fixed headings, Added entries misfiled under Fixed, a non-standard "v4 design decisions" heading, and a self-contradiction (JSON/XML ingestion described as both shipped and post-4.0 roadmap). Merged to one heading per category with all 59 entries and every (#NNN) reference preserved. Also fixed the stale benchmarks per-file-ignore path in pyproject.toml (tests/test_benchmarks.pytests/benchmarks/test_benchmarks.py) and removed the ten inline suppressions that fix makes redundant.

Docstrings (be650e4) — the WorkflowRemediation class docstring (rendered on the public API reference) showed a v3 example importing the removed get_hconfig from the nonexistent hier_config.model module and claimed Raises: ValueError where the code raises IncompatibleDriverError. Documented the FutureReport fields and 33 previously undocumented public members on autodoc'd classes. No code behavior changed.

Self-Review Checklist

  • poetry run ./scripts/build.py lint-and-test passes locally (lint + 95% test coverage).
  • Tests were written first (TDD) and cover the change, following the testing conventions. (No behavior change in this PR — library edits are docstring-only; the doc examples were verified by executing them against the repo fixtures.)
  • CHANGELOG.md has an entry under ## [Unreleased] referencing this issue/PR ((#297)).
  • Documentation is updated if public API or driver behavior changed (and mkdocs build --strict passes if docs were touched).
  • Commit messages follow the contributing guide: imperative mood, subject ≤72 characters, body explains why.

AI-Assisted Contributions

Written with Claude Code; the hier-config-review skill was run against the final diff (using the corrected next merge-base this PR introduces) — gates green, no blockers or should-fix findings.

Noted but out of scope

  • The docs CI job runs mkdocs build --strict without installing the package (fragile if griffe ever falls back to dynamic import); the include-markdown plugin is loaded but unused.
  • poetry.lock currently resolves mkdocs-redirectsproperdocs and mkdocstrings-pythongriffelib (forks that arrived transitively via Add AI-contributor standards: docs reorg, review skill, agent guidance #290's lock change; properdocs injects an "MkDocs is abandoned" banner into every build). Worth a separate review of those pins.
  • Empty tests/circular/ and tests/config_view/ directories remain from the test-layout move.

jtdub added 4 commits August 4, 2026 21:24
AGENTS.md claimed model fields must be immutable collections, but
HConfigDriverRules deliberately uses list fields so built-in rules and
callbacks can be removed by identity (#286); an agent following the rule
literally would break that API. Document the carve-out everywhere the
rule is stated (AGENTS.md, copilot-instructions, code-style.md, review
skill, new-driver skill).

The review skill diffed against master, which on any next-based branch
pulls in all of v4 and makes the report meaningless; switch to
merge-base against the actual base branch. Add the branching strategy
to AGENTS.md (previously only CLAUDE.md had it, so non-Claude agents
and Copilot would target master for v4 work) and drop the now-duplicate
section from CLAUDE.md.

Also surface facts agents had no way to learn: the CI Python matrix
(3.10-3.14), the unconditional docs --strict job and its separate
docs/requirements.txt, the formats layer (JSON/XML/NETCONF/gNMI),
future_with_report(), registry key canonicalization (#284/#295), and
per-driver unit test expectations. Fix CONTRIBUTING.md stale content
(nonexistent test file, missing yamllint/flynt, missing changelog
requirement, no branch-base guidance).
Several documented examples did not run or showed wrong output:
getting-started referenced a fixture that does not exist, tags.md
filtered on an 'ntp' tag its fixture never defines (actual output was
empty), remediation-workflows called a nonexistent delete_child()
method, config-views mixed switchport and ip address config and claimed
outputs the view never produces, and the hierarchical JunOS example was
missing six trailing set lines. All replacement outputs were verified
by running the snippets against the real fixtures.

Remove the hardcoded prerelease pin from install.md (it had already
drifted from pyproject) and add --pre to the README install so its
Quick Start, which uses the v4-only API, can actually run. Propagate
Aruba AOS-CX into the architecture driver table and config-views lists,
correct the HConfigViewBase abstract-member lists (dot1q_mode_from_vlans
is a concrete static helper), and align the interface-view example with
the in-tree base-class pattern.

Fill reference gaps: formats module, future_with_report/FutureReport,
resolve_driver, view data models, and the full built-in post-load
callback table in api-reference/rule-reference; glossary entries for
the registry, future reports, list_keys, callbacks, and
RemediationPlugin; rules-from-files loader constraints (one criterion
per lineage entry, Platform-only). Point the legacy utilities.md
redirects at admin/rules-from-files.md where that content actually
lives.
The Unreleased block had accumulated duplicate Added/Changed/Fixed
headings from successive merges, Added-type entries filed under Fixed,
a non-standard 'v4 design decisions' heading, and a stale claim that
JSON/XML ingestion was post-4.0 roadmap work when the same section
documents it as shipped. Merge to one heading per category, re-file the
misfiled entries, drop the contradictory sentence, and keep the design
decisions as an intro note. All 59 entries and every (#NNN) reference
are preserved.

Point the migration guide at the Unreleased section instead of a 4.0.0
CHANGELOG section that does not exist yet. Correct the per-file ignore
path for the benchmarks file, which moved to tests/benchmarks/ without
the lint config following; with the ignore active again, the inline
print suppressions it replaces became unused and were removed.
The WorkflowRemediation class docstring, which renders into the public
API reference, still showed a v3-era example importing the removed
get_hconfig from the nonexistent hier_config.model module, and claimed
__init__ raises ValueError when it raises IncompatibleDriverError.

Add attribute docs to the FutureReport fields (the user-facing contract
of future_with_report) and docstrings to 33 previously undocumented
public members on autodoc'd classes — driver extension points
(idempotent_for, sectional_exit, prefixes, config_preprocessor), the
HConfigViewBase contract, and the HConfigBase/HConfigChild/HConfig/
HConfigChildren members that doc examples tell users to call. Also add
this PR's changelog entry (#297).
@jtdub jtdub changed the title Docs/gap remediation Fix documentation, agent-instruction, and changelog gaps Aug 5, 2026
@jtdub
jtdub marked this pull request as ready for review August 5, 2026 13:55
@jtdub
jtdub requested a review from aedwardstx as a code owner August 5, 2026 13:55
@jtdub
jtdub merged commit e18798c into next Aug 5, 2026
6 checks passed
@jtdub
jtdub deleted the docs/gap-remediation branch August 5, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant