Skip to content

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

Draft
emmanuel-a-otchere wants to merge 1 commit into
mainfrom
vibe/rfc0003-tools-8eb746
Draft

emmanuel-a-otchere wants to merge 1 commit 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>
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