Skip to content

Sync agentic harness from IMS: enforcement gates, tested hooks, memories, licensing - #231

Merged
FrankRay78 merged 1 commit into
mainfrom
harness/parity-gates-and-memory
Jul 30, 2026
Merged

Sync agentic harness from IMS: enforcement gates, tested hooks, memories, licensing#231
FrankRay78 merged 1 commit into
mainfrom
harness/parity-gates-and-memory

Conversation

@FrankRay78

Copy link
Copy Markdown
Owner

Why

A cross-repo harness audit against IMS (the more built-out sibling) found NetPace was missing the enforcement layer for policies it already declares, plus one .NET-generic guard. This PR closes that gap. Everything is adapted to NetPace's single-src/ layout (tests live under src/, not a top-level tests/) and NETPACE_* overrides.

Most of IMS's extra harness is legitimately IMS-only (Fabric stack-guard, UI-automation denylist, surface tiers, domain memories) and is deliberately not ported.

What

Enforcement gates

  • green-gate.sh (new) — denies dotnet test --no-build when it would run a stale or absent build. Pure .NET footgun that was previously unguarded. Wired as a PreToolUse(Bash) hook.
  • traceability-gate.sh (new) — enforces Constitution §VIII deterministically: spec.md **Scenario:**test-plan.md #### Scenario: bijection, and #### Scenario: → test // SCENARIO: coverage under src/. NetPace already declared §VIII but nothing enforced it. NetPace already uses // SCENARIO: markers (9 test files), so the coverage edge is live, not latent. Wired as the Stop hook.
  • no-skipped-tests.sh (updated) — folds IMS's improvements into the existing gate: xUnit-v3 SkipUnless=/SkipWhen=, a --check audit mode immune to the env override, and CLAUDE_PROJECT_DIR rooting.

Hook hygiene

  • A runnable *.tests.sh matrix for each gate (52 / 12 / 34 cases, all green) and a hooks/README.md documenting each gate, its override, and its scope. Hooks are now tested and documented, not just present.
  • statusline-command.sh + settings.json statusLine/preferredNotifChannel (terminal bell).

Memories (project-agnostic, adapted)

feedback_dotnet_test_no_build, feedback_rerun_tests_before_done, feedback_markdown_soft_wrap, feedback_plain_language_decisions, feedback_audit_class_after_two_failures (+ MEMORY.md index).

Constitution amendment — bundled in this PR (flagged deliberately)

§VI Minimal Dependencies gains a permissive-licence constraint: runtime dependencies MUST be MIT/Apache-2.0/BSD; copyleft (GPL/LGPL/AGPL) prohibited without documented justification and maintainer sign-off. 1.5.0 → 1.6.0 (MINOR). Sync Impact Report updated in-file.

This is a governance change riding alongside tooling. It's bundled by explicit request; NetPace has no one-amendment-per-PR rule. If you'd rather keep governance isolated, say so and I'll split .specify/memory/constitution.md into its own PR.

Verification

  • All three gate matrices pass: 52 / 12 / 34.
  • Each gate --checks clean against the current tree (steady state = no-op).
  • settings.json validates as JSON.

🤖 Generated with Claude Code

…ies, licensing

Ports the harness enforcement layer NetPace was missing, adapted to its single-src/
layout (tests live under src/, not a top-level tests/) and NETPACE_* overrides.

Gates:
- green-gate.sh — deny `dotnet test --no-build` when it would run a stale/absent build
  (promotes feedback_dotnet_test_no_build). Wired as a PreToolUse(Bash) hook.
- traceability-gate.sh — enforce Constitution §VIII deterministically: spec.md
  **Scenario:** ⟷ test-plan.md #### Scenario: bijection, and #### Scenario: → test
  // SCENARIO: coverage under src/. Wired as the Stop hook. NetPace already uses
  // SCENARIO: markers (9 test files), so edge-2 is live, not latent.
- no-skipped-tests.sh — fold IMS improvements into the existing gate: xUnit v3
  SkipUnless=/SkipWhen=, a --check audit mode immune to the env override, and
  CLAUDE_PROJECT_DIR rooting.

Hook hygiene:
- A runnable .tests.sh matrix for each gate (52/12/34 cases, all green) and a
  hooks/README.md documenting the three gates, their overrides, and scope.
- statusline-command.sh + settings.json statusLine/preferredNotifChannel (terminal bell).

Memories (project-agnostic, adapted to NetPace):
- feedback_dotnet_test_no_build, feedback_rerun_tests_before_done,
  feedback_markdown_soft_wrap, feedback_plain_language_decisions,
  feedback_audit_class_after_two_failures (+ MEMORY.md index lines).

Constitution amendment (bundled by request):
- §VI Minimal Dependencies gains a permissive-licence constraint: runtime deps MUST be
  MIT/Apache-2.0/BSD; copyleft prohibited without justification + maintainer sign-off.
  1.5.0 → 1.6.0 (MINOR). Sync Impact Report updated in-file.

Verification: all three gate matrices pass; each gate --checks clean against the tree;
settings.json validates.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T6dd1XBNhEq42D6EsY6nPz
@FrankRay78
FrankRay78 merged commit 9edbe73 into main Jul 30, 2026
3 checks passed
@FrankRay78
FrankRay78 deleted the harness/parity-gates-and-memory branch July 30, 2026 12:57
FrankRay78 added a commit that referenced this pull request Jul 30, 2026
Aligns NetPace's workflow docs with IMS's generic/delta split:

- Add docs/agentic-workflow.md — the generic, stack-portable guide, re-synced
  from IMS's current version (body byte-identical; only the provenance comment
  differs, reflecting NetPace as the source-of-truth owner).
- Add docs/agentic-workflow-NetPace.md — the NetPace delta ("sidekick"),
  modelled on IMS's agentic-workflow-IMS.md. Records only where NetPace differs
  from the generic guide: has CI (5 workflows incl. Review B via claude.yml),
  a release pipeline (NuGet + cross-platform binaries), Change-Intent-Records
  as its decision ledger, no surface tiers, the gates from #231 (green-gate,
  no-skipped, traceability + format-on-commit + PR pre-flight; no stack-guard,
  no UI-automation denylist), and console-output snapshot verification.
  Flags one unreconciled divergence: NetPace formats on commit, which the
  generic guide now argues against.
- Delete docs/agentic-software-development-workflow.md — the April 2026 version,
  ~3 months stale and superseded by the two files above. No references to it
  remain anywhere in the repo.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T6dd1XBNhEq42D6EsY6nPz
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