Pstrucha says he reads AI-generated code when production risk matters, but side projects may get less scrutiny. Later reviews can reveal overly defensive code and weak tests, and after context compaction agents may repeat the same mistakes despite earlier feedback.
Stop Prompting
Speaker
Greg Pstrucha, an AI engineer at Sentry, explains how to make coding agents follow repository rules through deterministic checks and qualitative review policies.
Pstrucha argues for codifying conventions and quality expectations instead of repeatedly prompting agents. He recommends tests, strict typing, and linters, with linters as a way to enforce specific rules; he also cautions that strict typing alone cannot prevent unwanted states if the type system still allows them.
Pstrucha says custom lint rules have become cheaper to create with agents, while agents lack the memory that lets people learn from repeated feedback. At Sentry, rules require endpoint response types without Any, an extend_schema decorator, and agreement between implementation types and the OpenAPI schema. Other rules validate skill code examples against the sandbox and schema, helping keep agent guidance aligned with changing APIs.
Some design judgments, such as whether a small change makes a three-state machine balloon to ten states, are hard to express reliably as lint rules. Pstrucha describes repository policies for stronger tests and less defensive code, reviewed by a skill called Grumpy Engineer, also known internally as Garfield, which runs subagents until they stand down. The goal is to reduce elementary feedback in code review, not remove review.
Pstrucha warns that agents optimize for numeric targets such as cyclomatic complexity and test coverage. In his experiments, projects reached near 100% coverage with tests that asserted specific output strings without measuring useful behavior. He recommends asking agents to help create linters and policies, while treating qualitative measures carefully.
Takeaways
- Collect repeated review comments and turn the deterministic ones into lint rules.
- Use tests, strict typing, and linters together; each catches different problems.
- Check agent examples against executable code and current API schemas.
- Write repository policies for quality judgments that linters cannot reliably capture.
- Do not treat high coverage or low complexity numbers as proof of maintainable code.
Mentioned in this talk
Search inside this talk
What was claimed 6
- works atGreg Pstrucha works at
Sentry
AI engineer“I'm an AI engineer at Sentry.”
YouTube Verified3 sources· Talk, Web· archived
- featurecustom lint rules: Check endpoint response types, require schema documentation, and verify implementation types against OpenAPI declarations.
“We enforce that the actual type produced agrees with what the OpenAPI schema declares.”
YouTube Unverified1 source· Talk
- uses
“It uses Sentry telemetry to debug and find the root cause of issues.”
YouTube Unverified1 source· Talk
- featurecustom lint rules: Validate code blocks in agent skills by type-checking them, running them in a sandbox, and checking them against the OpenAPI schema.
“You have to extract it, make sure it type-checks, that it can run in our sandbox, and that whatever it declares agrees with Sentry's OpenAPI schema.”
YouTube Unverified1 source· Talk
- featureTaskless: Derives a linter from an intent written in English.
“You write your intent in English, and then the linter is derived from it.”
YouTube Unverified1 source· Talk
- featureGrumpy Engineer: Runs subagents against repository policies until they stand down.
“It takes all the policies and runs subagents for each one.”
YouTube Unverified1 source· Talk










