Skip to content

feat: add neural-gate — behavioral constraint echo detection#1424

Open
YuhaoLin2005 wants to merge 8 commits into
anthropics:mainfrom
YuhaoLin2005:feature/neural-gate
Open

feat: add neural-gate — behavioral constraint echo detection#1424
YuhaoLin2005 wants to merge 8 commits into
anthropics:mainfrom
YuhaoLin2005:feature/neural-gate

Conversation

@YuhaoLin2005

Copy link
Copy Markdown

What

A post-session check that verifies whether behavioral constraints actually appeared in agent output. Complements filesystem gates (which verify file state) with NL-channel verification (which detects whether rules shaped behavior).

Why

Filesystem gates check that files were updated, hooks are wired, and exit codes fired. But they don't answer: did the rules we wrote actually change what the agent did? Neural-gate fills this gap by scanning session transcripts for constraint keyphrases.

How It Works

Stop hook → read constraint keyphrases from config → scan session transcript → report echo rate per constraint → never blocks (detection only, not enforcement)

Honest Limitations

  • Keyphrase echo ≠ behavioral compliance (mentioning a rule ≠ following it)
  • False positives: agent can echo a constraint while ignoring it
  • False negatives: constraint may shape behavior without being explicitly named
  • Explicitly a weak proxy; v2 roadmap: semantic similarity scoring

These limitations are structural — the same Prose Barrier (verification and generation share the NL channel) that makes filesystem gates necessary.

Integration

Module D of a composable quality pipeline. Works standalone. Complements:

The only gate that explicitly does not block — it detects, reports, and lets the human decide.

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