Skip to content

feat(skills): guardrails for n2n_kill, lab mode and emergency changes (spec 192) - #353

Merged
automateyournetwork merged 1 commit into
automateyournetwork:mainfrom
byrn-baker:192-skill-guardrails
Nov 12, 2026
Merged

automateyournetwork merged 1 commit into
automateyournetwork:mainfrom
byrn-baker:192-skill-guardrails

Conversation

@byrn-baker

Copy link
Copy Markdown
Collaborator

Problem and resulting behavior

Three skills name a high-impact action but leave the agent to decide when it applies:

  • n2n-federation says to confirm n2n_kill but not when to propose it. It now lists when (malicious or corrupted data the agent can see, an operator request, a revoked peer that keeps connecting) and when not (a dead endpoint, where n2n_forget_endpoint keeps the federation; a slow peer; a general question). A proposal names the peer and the evidence and says restoring needs a new n2n_consent.
  • protocol-participation says lab mode must not be set in production but not who sets it. Safety Rule 7: only the operator sets NETCLAW_LAB_MODE, in .env; the agent never sets or exports it, treats route mutations as production unless it is already true, and does not suggest enabling it unless asked.
  • pyats-config-mgmt lets an emergency bypass CR approval with no test for what counts. Now all three must hold: the outage, incident or exploited vulnerability is affecting production now; the operator has confirmed the urgency in the conversation; the fix is a single change that can be rolled back. Otherwise the standard CR workflow applies, and a qualifying emergency records the conditions and evidence in GAIT.

Skill descriptions are unchanged; the catalog's skill digests are regenerated.

Numbered Spec Kit specification (required for every PR)

  • Spec number and directory: specs/192-skill-guardrails/
  • Specification: spec.md
  • Research and plan: research.md, plan.md
  • Tasks and verification: tasks.md, verification.md
  • Spec Kit workflow used: the checked-in templates and the order spec → research → plan → tasks → implement, written by hand (no slash-command integration in this agent).
  • Existing-spec follow-up, if applicable: n/a.

Release

  • Proposed version and bump: 1.22.1, patch (skill guidance, no code).
  • Release notes/changelog: docs/releases/1.22.1.md, CHANGELOG.md. Specs 187–191 merged after 1.22.0 without a release entry; this entry lists only 192.

Validation

Offline, on Ubuntu 24.04 against main at 150fd24:

  • build-catalog.mjs --check, build-catalog.py --check, check-catalog-metadata.py, verify-catalog-coverage.py, test_setup_catalog.py: pass.
  • check-skill-limits.py: ok (242 skills).
  • verify-spec-artifacts.py, prepare-release.py --check, test-prepare-release.py: pass.
  • reconcile-mcp.py with the release surfaces: exit 0. The full run exits 1 on this host on both this branch and unchanged main (startup: servers not installed here).
  • pytest tests/n2n/test_convergence_member_164.py tests/unit/test_jev_border.py tests/skill-limits tests/netconverter/test_installation.py: 39 passed, 1 failed; the failure (unsafe_parent) also fails on unchanged main on this host.

Not verified: an evaluation of agent decisions with and without the rules. The rules have been in an operator Border's workspace copies of these skills since October 2026; that shows they load alongside the rest of each skill, not that they change decisions.

Compatibility, migration and risks

No migration. Existing workspaces keep the old text until skills are redeployed (scripts/deploy-skills.py). These are instructions to the agent; the MCP servers' CR and lab-mode gates are unchanged.

Contributor checklist

  • I followed CONTRIBUTING.md and used a numbered spec before implementation.
  • Spec, research, plan, tasks and verification describe the final PR scope; any required maintainer scope review is complete.
  • Specification artifact and declaration reconciliation checks pass.
  • Relevant tests pass; live, browser, Docker and host coverage gaps are stated explicitly.
  • Applicable integration, installer, HUD and documentation surfaces are updated (or non-applicability explained).
  • Completed-spec version bump, changelog and release notes are included or an explicit coordinated release plan is linked.
  • No credentials, private network configuration or customer topology are included.
  • Compatibility/migration and any operational approval requirements are documented.

🤖 Generated with Claude Code

… (spec 192)

- n2n-federation: when to propose n2n_kill, and n2n_forget_endpoint for a dead
  endpoint.
- protocol-participation: only the operator sets NETCLAW_LAB_MODE.
- pyats-config-mgmt: three conditions before an emergency bypasses CR approval;
  record them in GAIT.
- Regenerate skill catalog digests. Release 1.22.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@automateyournetwork
automateyournetwork merged commit cfafa46 into automateyournetwork:main Nov 12, 2026
41 checks passed
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.

2 participants