Aegis: Verifiable Safety Layer for AI Document Edits - #214
Open
Vishwak-8055 wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Aegis — Verifiable Safety Layer for AI Document Edits
Aegis introduces a verification and decision layer for AI-driven document transformations. Its core objective is simple: an AI-generated edit should not be accepted merely because it looks plausible—it must first be verified against the requested scope and protected document invariants.
The implementation is deliberately conservative: deterministic checks remain authoritative, AI-assisted reasoning is isolated behind an explicit provider boundary, and failed edits are blocked or recovered rather than silently committed.
Engineering highlights
shall,must,may, prohibitions, permissions, and negation.accept,review, orblockoutcomes.EditProofcontaining verification results, evidence, policy decisions, and document hashes.SuperDocClientinterface with a deterministic mock adapter for development and CI.Verification
The implementation was validated end-to-end with:
Design principle
Aegis treats AI output as untrusted proposed state, not authoritative document state.
The execution boundary therefore follows:
Instruction → Intent Contract → AI/Document Edit → Verification → Risk Decision → Commit or Block → EditProofThis makes verification a first-class part of the document-editing workflow rather than an after-the-fact quality check.
SuperDocs integration
The implementation keeps the verification core independent from the concrete document client. The
SuperDocClientabstraction defines the integration boundary, while the mock adapter provides deterministic local execution and CI coverage.This allows the safety layer to be integrated with the document-editing workflow without coupling the verification logic to a single execution implementation.
Scope of this PR
This PR adds the Aegis use case under:
use-cases/Vishwak-8055/aegis-verifiable-edit-engine/It is self-contained, documented, tested, and designed as an integration-ready verification layer rather than a standalone UI demonstration.
Submitted by Vishwak Teja.