cd /news/ai-tools/how-i-built-a-serverless-pr-gatekeep… · home › topics › ai-tools › article
[ARTICLE · art-181380] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

How I Built a Serverless PR Gatekeeper with Kiro Specs, Steering Rules, and 851 Automated Tests

A developer built BlastGuard, a serverless pull request gatekeeper on AWS that combines a TypeScript Compiler AST dependency crawler, a deterministic Terraform/CDK FinOps pricing and security rule engine, and Amazon Bedrock synthesis, backed by 851 automated tests. The project kept generative AI strictly downstream of deterministic static analyzers so hallucinated file paths or model throttling cannot break the check, with Bedrock's Nova 2 Lite model producing review summaries only when available and a rule-based fallback otherwise. The developer used Kiro IDE specs and steering files to enforce architecture and UI boundaries across a three-package TypeScript monorepo.

recommendation

Gate LLM output behind deterministic AST and rule-engine checks, and pair Bedrock synthesis with a rule-based fallback so throttling or disabled models still return structured summaries.

more in playbook: Designing agent systems
by read2 min views1 publishedDec 3, 2026

Standard CI linters catch syntax errors and formatting drift, yet two expensive regressions regularly slip through pull request reviews:

For Kiroween 2026 (Frankenstein category), I built BlastGuard solo—a serverless pull request gatekeeper that stitches together a TypeScript Compiler AST dependency crawler, a deterministic us-east-1 Terraform/CDK FinOps pricing and security rule engine, and Amazon Bedrock synthesis on AWS. .kiro/ Directory: An LLM alone cannot be trusted as a pull request check: if it hallucinates impacted file paths or fails when an upstream model throttles, developers disable it immediately. To make BlastGuard reliable, generative AI had to stay strictly downstream of deterministic static analyzers.

Engineering a 3-package TypeScript monorepo (infra/, backend/, web/) solo under a hackathon deadline meant keeping strict boundaries between AWS CDK infrastructure, static AST/Terraform parsers, Bedrock fallback logic, and the React dashboard. Kiro IDE kept those invariants intact from day one through four workflows:

.kiro/specs/) Instead of prompting ad-hoc files into existence, I defined formal requirements, system design, and 15 incremental implementation tasks inside .kiro/specs/ before writing application code. Every acceptance criterion—such as bounding AST traversal depth, caching scan results by commit SHA in DynamoDB, and rejecting private IP ranges before outbound fetches—mapped directly to automated tests.

.kiro/steering/architecture.md) I used .kiro/steering/architecture.md to enforce hard system boundaries across every Kiro session:

/api/*) with strict HSTS and X-Content-Type-Options headers to AWS API Gateway, while GitHub webhooks post directly to POST /api/webhook so raw request bytes remain intact for X-Hub-Signature-256 HMAC verification.us.amazon.nova-2-lite-v1:0) synthesizes concise review summaries when available, while a deterministic rule-based summary engine guarantees structured output with zero 500 errors if Bedrock is throttled or disabled.gsi1) and AWS SSM SecureString parameters..kiro/steering/ui-system.md) To keep the dashboard fast and scannable rather than cluttered with generic card templates, .kiro/steering/ui-system.md enforced custom dark-mode tokens, tabular numerals (tabular-nums) for cost deltas and impacted file counts, severity noise filtering, keyboard shortcuts (/ to focus PR input, 1–3 to switch

── more in #ai-tools 4 stories · sorted by recency
── more on @blastguard 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-i-built-a-server…] indexed:0 read:2min 2026-12-03 · —