Skip to content

Add se-trace check-guardrails (RFC-0003 Layer 3 surfacing) - #5

Merged
emmanuel-a-otchere merged 2 commits into
mainfrom
vibe/rfc0003-tools-8eb746
Nov 5, 2026
Merged

emmanuel-a-otchere merged 2 commits into
mainfrom
vibe/rfc0003-tools-8eb746

Conversation

@emmanuel-a-otchere

Copy link
Copy Markdown
Contributor

Summary

  • Add the se-trace check-guardrails subcommand (RFC-0003): prints each decision's stored GuardrailDecision (decision, binding/advisory, rule, rationale, evaluated_at/by), reporting "producer has not floored Layer 3" for absent records. With --rules <file> it re-evaluates the COTS against a guardrail rule file. Exit codes: 2 for rejected decisions (binding rules), 3 for escalations, 0 otherwise
  • Add src/guardrails/layer3.ts: a thin consumer-side port of the reference implementation's Layer 3 (parser + evaluator) for rule-file re-evaluation; the authoritative implementation remains in the reference-implementation repo
  • Add the GuardrailDecision types to src/cots.ts (COTS schema v1.3.0)
  • Two new end-to-end CLI tests; README updated

Verification

  • npx vitest run: 11/11 tests pass
  • npx tsc --noEmit: clean

Co-authored-by: emmanuel-a-otchere <emmanuel-a-otchere@users.noreply.github.com>
@emmanuel-a-otchere emmanuel-a-otchere self-assigned this Nov 5, 2026
@emmanuel-a-otchere
emmanuel-a-otchere marked this pull request as ready for review November 5, 2026 07:45
@emmanuel-a-otchere
emmanuel-a-otchere merged commit c47ae28 into main Nov 5, 2026
1 check failed
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