Ideas from AI Engineer talks Curated by Alex Vidal (@dobleio) and Borja Pérez (@borjaperfra) 76 ideas · 101 talks · 5 events

The Engineering Brief

Michal Cichra's checks reject an agent's commit and point it to the decision record

Michal Cichra's team records architecture decisions as ADRs and enforces them with import rules and other checks in Git hooks and CI. When an agent's commit breaks a rule, the failure links to the document explaining why the rule exists and how to fix it.

Michal CichraAIE Europe 20263 min read
Watch from 1:08

Recording by AI Engineer.

The idea

The speaker’s argument, in our words.

Cichra's premise is that people forget and leave, and agents lose context to compaction, so the reasons behind a rule have to live outside any person or session. He uses three kinds of record: architecture decision records (ADRs) for why the code is shaped as it is, short product requirement documents for why a feature exists, and executable BDD scenarios in Cucumber for how it should behave, which he finds easier to review than AI-written tests.

A document cannot enforce itself, so the same checks run as Git hooks and again in CI, which catches agents that skip the hooks. Some rules are structural: the end-to-end suite may not import modules that can reach the database, and templates may not query it. When a commit is rejected, the message names the rule and links to the record; the agent reads it, fixes the change and tries again. He reports long sessions that survive many compactions because the agent can look the rules up again.

What they found

From the talk. Figures are self-reported unless stated.
  • An ADR records why something is done and how it is enforced; a tool does the enforcing and tells the agent the rule, why it exists and how to fix the violation, after which the agent looks up the document. The ADR can also state which files or folders it applies to.

    He says there is no required ADR format and mentions about fifty ADRs defining his product's architecture (1:56).

    Technical recommendation

    2:47
  • His team runs the same tasks as Git hooks and on CI (linting, formatting, type checking, duplication, architecture checks and document linting), so an agent that skips the hooks is still caught.

    Description of his team's harness; no failure or bypass rates given.

    Case study

    7:59
  • Architecture is enforced through module import rules: the end-to-end BDD suite cannot import anything that can reach the database, and templates cannot talk to the database, which he says rules out N+1 queries entirely.

    The speaker's claim. The rule blocks one route to N+1 queries (queries issued while rendering); the talk shows no data on other paths.

    Case study

    8:44
  • The approach is context-heavy (initial research can use half the context window), but over the last half year his sessions have run through twenty to fifty compactions without losing their way, because important rules can be looked up again.

    Personal experience, hedged by the speaker ('actually works, I think'); not measured.

    Case study

    11:05

Why it matters

Our reading. Not said in the talk.

Many teams write ADRs and many run linters; the useful part for agents is the link between them. A failing check that names its rationale gives the agent the context when it needs it, instead of loading every rule into the prompt up front. Lauren Tan's team reached a similar design with lint rules whose error messages explain the root cause. Cichra adds the record behind the rule, which he credits with keeping long sessions on course through many compactions, because the agent can always look the rule up again.

What one could try

  • Add a link to the relevant ADR or design note in the error message of each architecture or lint rule.
  • Run the same checks in CI as in local Git hooks, since hooks can be skipped.
  • Enforce layering with import rules where you can, for example forbidding end-to-end tests from importing database modules.

Limitations

  • No measurements; the compaction claim is personal experience, hedged by the speaker.
  • He notes the cost: reading the records can use about half the context window before work begins.
  • 'No N+1 queries ever' covers queries from templates; other paths are not discussed.

Original sources

This is our synthesis of the talk, checked against the transcript at the linked moments.

Related ideas