Skip to content

docs: parity audit — sync all docs with v1.0.3 code state#73

Merged
thomaschristory merged 8 commits into
mainfrom
docs/parity-audit-v1.0.3
May 16, 2026
Merged

docs: parity audit — sync all docs with v1.0.3 code state#73
thomaschristory merged 8 commits into
mainfrom
docs/parity-audit-v1.0.3

Conversation

@thomaschristory
Copy link
Copy Markdown
Owner

Documentation parity audit (post-v1.0.2 → v1.0.3 code state)

Executes the approved documentation-audit design spec (docs/superpowers/specs/2026-05-12-documentation-audit-design.md). Brings all hand-written user-facing and contributor docs into parity with the current code on main (952570f, version 1.0.3 in nsc/_version.py).

Method

  1. Phase 1 — Ground-truth capture. Built a definitive, source-cited CLI inventory (meta-commands + flags, Config/Profile/Defaults, OutputFormat, SchemaRefresh, exit codes, env vars, bundled schemas) directly from nsc/ source. Surprising facts spot-verified against source.
  2. Phase 2/3 — File-by-file audit + fix, in 6 batches, every change traced to a specific source fact. Conservative rule: a flagged uncertainty beats a wrong "fix". No restructuring, no style-only churn, auto-generated files untouched.

Notable corrections (things agents/users would have gotten wrong)

  • nsc describe does not exist — was referenced ~10× across SKILL.md, using-with-ai-agents.md, working-with-plugins.md. Removed/replaced with nsc commands --schema … --output json.
  • nsc commands requires --schema — examples that omitted it would fail. Fixed everywhere.
  • replace (PUT-with-id) verb — a real registered verb (build.py:178, registration.py:66-68) that was missing from the verb lists; restored in concepts.md/SKILL.md, documented in command-generation.md.
  • HTTP retry policy (safety-relevant)http-client.md claimed "retries 5xx, 3 attempts". Writes are never retried on 5xx; corrected to the actual method-aware policy.
  • Schema cache invalidation — docs implied per-invocation hash check + "regenerating…" notice. Corrected to the TTL fast-path: default policy is daily, freshness keyed off the <hash>.meta.json sidecar fetched_at, forced via --refresh-schema / nsc login --fetch-schema.
  • nsc init is offline-safe — docs claimed it fetches the schema; it does not. Wizard prompt order corrected.
  • nsc login — documented --fetch-schema and the post---new "Fetch and cache the live schema now?" auto-prompt (default yes); --rotate does not prompt/fetch.
  • nsc skill export <dir> — newly documented in CHANGELOG/README/guides; clarified it writes <dir>/netbox-super-cli/SKILL.md and is dry-run unless --apply.
  • Bundled schemas — corrected stale lists to 4.5.10 + 4.6.0 (4.6.0-beta2 dropped); offline fallback is the newest manifest entry, not a version match.
  • nsc refresh / bundled-default sentinel — non-existent; removed.
  • Misc: env vars are NSC_* only (no NETBOX_*); nsc cache only has prune; non-TTY output auto-switches to JSON; exit-code contract restated from source.

The CHANGELOG already carried a dated ## v1.0.3 section (from aa8fccf chore(release): 1.0.3); existing entries were refined for accuracy, none duplicated.

Verification

  • uv run mkdocs build --strictpasses (no broken links / missing nav).
  • Full test suite — 628 passed, 1 skipped (skip = NSC_BENCH benchmark gate).
  • scripts/gen_docs.py re-run — no drift; auto-generated docs/reference/{cli,config,schemas,exit-codes}.md are current and were left untouched (they are all generated, not just cli.md/schemas.md).

⚠️ Documentation website deploy is NOT triggered by this merge

.github/workflows/docs.yml deploys GitHub Pages only on a v* tag push (if: github.ref_type == 'tag'); PR/docs/** runs are build-only (mkdocs build --strict). No v1.0.3 tag exists (tags stop at v1.0.2; main is v1.0.2-18-g…). So merging this PR makes the docs CI green but does not publish the live site. Publishing requires cutting the v1.0.3 release tag — a full release (also triggers PyPI publish via release.yml) — which was deliberately not done autonomously. Tag v1.0.3 when ready to release; the corrected docs will deploy then.

Scope

Out of scope per spec: CLAUDE.md, AGENTS.md, auto-generated reference pages, new pages/guides.

🤖 Generated with Claude Code

Thomas Christory and others added 8 commits May 16, 2026 01:10
first-run: correct nsc init wizard prompt order, remove false 'fetches the schema' claim (init is offline-safe), document login verify probes, --fetch-schema, and the post-'login --new' schema-cache auto-prompt. concepts: drop non-existent 'PUT /things/{id}/ -> replace' verb (only list/get/create/update/delete + custom actions are registered).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Batch-2 audit wrongly removed the 'PUT /things/{id}/ -> replace' line based
on an incomplete ground-truth inventory. Verified against source: a 'replace'
verb IS registered for resources with a PUT-with-id op
(build.py:178, registration.py:66-68). Restoring the line.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- using-with-ai-agents: add required --schema to 'nsc commands' example
  (the one occurrence the audit missed; nsc commands --schema is required).
- SKILL.md + writes-and-safety: malformed *single* JSON/YAML input is a
  client error (exit 6), NOT input_error/exit 4 — only a bad NDJSON/JSONL
  line is input_error/exit 4 (handlers.py:321 vs :329, errors.py:41/43).
- SKILL.md: drop invented '2 usage/bootstrap' from the typed scripting
  contract (no code 2 / no bootstrap type in errors.py:EXIT_CODES;
  contradicted generated exit-codes.md) — footnote code 2 instead.
- ci-and-automation: --max-age prune is profile-agnostic and DOES delete
  aged adhoc files (store.py:_find_aged_files has no adhoc guard); only the
  default prune spares adhoc.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@thomaschristory
Copy link
Copy Markdown
Owner Author

Adversarial review completed (2 independent reviewers)

Two skeptical reviewers re-derived facts from source, ignoring the working ground-truth file (which itself had a known error). CI is green on all platforms.

Real issues found & fixed in 9ded6ab:

  1. using-with-ai-agents.mdnsc commands --output json missing required --schema (the one spot the audit missed; fixed everywhere else).
  2. SKILL.md + writes-and-safety.md — malformed single JSON/YAML input is client/exit 6, not input_error/exit 4; only a bad NDJSON/JSONL line is exit 4 (handlers.py:321 vs :329).
  3. SKILL.md — invented 2 usage/bootstrap inside the typed scripting contract; no such code/type in errors.py:EXIT_CODES and it contradicted generated exit-codes.md. Footnoted code 2 instead.
  4. ci-and-automation.md--max-age prune does remove aged adhoc files (no guard in store.py:_find_aged_files); only the default prune spares adhoc.

Verified clean: scope (no auto-gen/CLAUDE.md/AGENTS.md edits), cross-file consistency (replace verb, TTL/daily, skill-export path, env namespace), all spec success criteria, mkdocs build --strict, 628 tests.

Note: concepts.md nets to a zero diff (a wrong batch-2 removal of the replace line, corrected in 7747dc2); harmless under squash-merge.

⚠️ Reminder: docs Pages deploy is v*-tag-gated; no v1.0.3 tag exists. Merging makes CI green but does not publish the live site — cut v1.0.3 to deploy (also triggers PyPI release).

@thomaschristory thomaschristory merged commit 0ef02d6 into main May 16, 2026
10 checks passed
thomaschristory added a commit that referenced this pull request May 16, 2026
Maintenance release: codebase-wide simplification pass (#61-#71),
documentation parity audit (#73), urllib3 2.6.3->2.7.0 (#46).
No CLI/config/output-contract changes vs v1.0.3.

Co-authored-by: Thomas Christory <tchristory@partner.auchan.fr>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@thomaschristory thomaschristory deleted the docs/parity-audit-v1.0.3 branch May 16, 2026 10:58
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