SemanticRule
rule_id: AUTH-BOUNDARY-001
status: approved
severity: critical
invariants:
- type: forbidden_import
forbidden_imports:
- '@acme/billing'
enforcement:
mode: block Intent-Aware Code Review
Turn approved engineering docs, ADRs, and project rules into deterministic pull request checks before intent drift reaches main.
AxiomGuard is an intent-aware code review guard for TypeScript PRs that turns approved rules into proof-carrying checks.
SemanticRule
rule_id: AUTH-BOUNDARY-001
status: approved
severity: critical
invariants:
- type: forbidden_import
forbidden_imports:
- '@acme/billing'
enforcement:
mode: block Changed diff
Proof-carrying finding
Trace
S-Agent Core v0.2.0
The new release turns S-Agent from a local CLI demo into a CI-ready semantic guard: teams can run approved SemanticRules in GitHub Actions and track quality with a reproducible benchmark leaderboard.
Use the composite action to call the existing CLI with project, rules, output-format, and fail-on-blocking inputs.
Run pnpm benchmark for JSON output, a Markdown table, precision, recall, false-positive rate, PROVEN rate, runtime, and clean blocking rate.
The release adds CI and measurement infrastructure without PR comments, hosted services, dashboards, or artificial analyzer tuning.
Real repo demo
The landing demo uses the same fixture shipped in this repository: a CLAUDE.md rule, an approved SemanticRule, a TypeScript import violation, and the CLI report that blocks only after symbolic proof.
pnpm analyze:demo:broken pnpm analyze:demo examples/demo-typescript-app/CLAUDE.md The authentication layer is identity-only. It must not import billing code or trigger billing side effects directly.
examples/demo-typescript-app/rules/auth.rules.yml rule_id: INV-AUTH-001 status: approved severity: critical from: src/auth/** to: src/billing/** mode: block
examples/demo-typescript-app/src/auth/session.ts import { BillingService } from "../billing/billing-service";
const billing = new BillingService();
billing.recordSessionStart({ userId, reason: "auth-started" }); apps/cli Changed file: src/auth/session.ts Evidence: import edge auth -> billing Status: PROVEN Severity: critical Blocking: yes
$ pnpm analyze:demo:broken # S-Agent Report Project: examples/demo-typescript-app ## Violation: INV-AUTH-001 Changed file: src/auth/session.ts Changed symbol: module Problem: Layer boundary violation: src/auth/session.ts imports ../billing/billing-service. Why this matters: The authentication layer is identity-only; billing behavior must stay inside the billing domain. Evidence: - src/auth/session.ts:1 - forbidden boundary - CLAUDE.md:3 - CLAUDE.md#authentication-module Status: PROVEN Severity: critical Blocking: yes
$ pnpm analyze:demo # S-Agent Report Project: examples/demo-typescript-app-clean No findings.
Intent-aware review
AxiomGuard gives reviewers concise, source-backed answers about what changed, which approved rule was violated, and why the finding can or cannot block.
AxiomGuard is an intent-aware code review tool for engineering teams that need pull requests to preserve approved business and architecture rules. It turns SemanticRule YAML into deterministic TypeScript checks and reports proof-carrying findings reviewers can audit.
Intent-aware code review verifies whether a code change preserves documented business, product, and architecture intent. It catches changes that compile and pass tests but still violate approved rules such as module boundaries, side-effect limits, or value thresholds.
AxiomGuard is built for TypeScript-heavy teams using AI coding tools, large refactors, or fast-moving product engineering workflows. It is most useful when important rules live in ADRs, READMEs, CLAUDE.md, or senior engineers' repeated review comments.
Docs become guardrails
AxiomGuard starts where teams already write intent: CLAUDE.md, READMEs, ADRs, and architecture notes. Candidate rules can be suggested, but the approved YAML file is the source of truth.
The MVP stays deliberately narrow: TypeScript diffs, symbolic checks, and proof-carrying findings for the three violations that teams repeat by hand.
auth must not import billing
import { charge } from '../billing/service' read-only flows must not write
await db.invoice.update(...) discount cannot exceed max
discount = 0.85 How it works
The review path stays small and auditable: approved rules, TypeScript analysis, symbolic evidence, and conservative blocking.
Comparison
AxiomGuard is not another generic scanner. It adds a deterministic intent layer beside the tools teams already use.
| Alternative | What it checks | What AxiomGuard adds |
|---|---|---|
| SAST | Security vulnerability patterns | Product and architecture intent, such as billing boundaries and domain invariants |
| Linters | Style, syntax, and generic code-quality rules | Team-specific business rules backed by approved documentation |
| AI reviewers | Broad contextual suggestions and plausible concerns | Deterministic blocking only when approved rules produce symbolic evidence |
| Architecture tools | Dependencies, packages, and structural drift | PR-level reports tied to documented business and architecture intent |
Search topics
These short pages answer the priority questions teams ask when they compare semantic review, AI guardrails, architecture drift prevention, and business logic regression prevention.
Semantic code review checks whether a TypeScript pull request preserves approved business and architecture intent, not only syntax, style, or security patterns.
intent-aware code review Intent-Aware Code Review GuardrailsIntent-aware code review verifies that every pull request preserves documented business, product, and architecture rules.
AI code review guardrails AI Code Review Guardrails for Generated CodeAI code review guardrails help teams keep AI-generated and refactored code aligned with approved business and architecture rules.
architecture drift prevention Architecture Drift Prevention for Pull RequestsArchitecture drift prevention catches pull requests that violate documented module boundaries and approved architecture decisions.
business logic regression prevention Business Logic Regression Prevention in Code ReviewBusiness logic regression prevention checks pull requests for rule violations such as unsafe side effects, broken product invariants, and invalid thresholds.
Finding statuses
Heuristics can point reviewers toward risk. Blocking remains conservative: approved critical rules, deterministic evidence, and a concrete trace.
A deterministic check found symbolic evidence for an approved critical rule.
A strong signal needs human judgment before it can become enforceable.
A weak signal is useful context, not a reason to stop a merge.
A heuristic suspicion disagrees with deterministic evidence.
The finding has no actionable evidence for this change.
FAQ
No. AxiomGuard complements SAST by checking business and architecture intent rather than security vulnerability classes.
The MVP does not use an LLM for enforcement. Future LLM features may suggest candidate rules or explanations, but approved SemanticRules remain the source of truth.
Only a PROVEN finding from an approved critical rule in block mode can block a pull request.
The MVP is TypeScript-first and focuses on deterministic symbolic checks for TypeScript diffs.
No. Teams can start with one important rule reviewers already enforce manually, then expand the SemanticRule set over time.