Teaching the AI Your House Rules

🎯 Who this is for: Developers, tech leads and engineering managers who keep correcting the same AI mistakes, and want the agent to get it right the first time.

Series: Part 11 of 13 — Enterprise Vibe Coding | Read time: 6 minutes

It's a Tuesday at a regional utility. A developer asks an AI agent to add a validation to the billing module. Twenty seconds later there's a tidy diff. It uses a logging library the team banned two years ago. It hardcodes a site code. It concatenates a user value straight into a SQL string. The code works. It is also wrong, in three ways only someone who has been on the team for a year would spot.

None of that is the model being stupid. It's the model being new. Nobody told it the house rules.

Every enterprise has them: naming prefixes, approved libraries, "never touch that table directly", "all errors go through the message catalogue". Usually they live in a wiki nobody reads and in the heads of three senior engineers. Humans pick them up over months of code review. An agent starts from zero every session — unless you write them down where it will look.

🧑‍💼 The New Hire Who Reads Everything

Here's the good news: an AI agent is the most diligent new hire you'll ever onboard. It actually reads the onboarding doc. Every time. Before every task.

That flips an old problem. Writing standards down used to feel pointless because people skimmed them. Now there is a reader that doesn't skim. The team that writes its conventions down once gets them applied on every request; the team that doesn't ends up retyping "remember, we use the X prefix" into chat forever.

Our phrase for this is simple: methodology beats prompting. A clever one-off prompt helps one task. A written-down method helps every task, for every developer, in every tool.

IBM's Bob team says something similar in its own launch guidance: "Iterate, do not one-shot," and "It is now easy to produce a large amount of code that works and is wrong." House rules are how you shrink the "works and is wrong" pile before review even starts.

🧱 Four Layers of House Rules

Every serious agent now supports some version of the same four layers. The names differ; the idea doesn't.

LayerWhat it doesExamples across tools
AGENTS.mdProject-wide briefing: build, test, conventions, don'tsOpen format read by many agents; Bob's /init generates one; Kiro reads it too
Rules / steeringAlways-on (or file-matched) instructionsBob .bob/rules/, Kiro .kiro/steering/, Cursor rules, Copilot instructions, Claude Code CLAUDE.md
SkillsTask playbooks loaded only when relevantBob .bob/skills/ (a SKILL.md with name + description), Claude Code skills
MCPAccess to live systems and tools outside the repoBob .bob/mcp.json, plus MCP config in Claude Code, Cursor, Copilot and others

AGENTS.md is the one to start with because it travels. It's an open format, now stewarded by the Agentic AI Foundation under the Linux Foundation — the same new home as MCP. One file, read by many agents, so you're not locked into whichever tool procurement picks next year.

Rules are the always-on layer. Kiro, for example, ships three "foundation" steering files — product.md, tech.md and structure.md — and lets you mark others as always-included or only loaded when matching files are touched. Bob keeps rules in .bob/rules/ and lets you exclude files with .bobignore.

Skills are the clever bit. Instead of stuffing every procedure into one giant prompt, you package each one ("convert a Java class to a script", "write a migration") as a small folder with a description. The agent loads it only when the task matches, so context stays clean.

MCP is the doorway to the real world, which we covered in Part 3. Rules tell the agent how to behave; MCP decides what it can reach.

💡 Readiness check: If your repo has a README and a CI pipeline but no AGENTS.md, it isn't ready for agents yet. Treat the file like a build script: versioned, reviewed in pull requests, owned by someone. When a reviewer catches the same AI mistake twice, the fix goes into AGENTS.md — not into a Slack reminder.

✍️ What Good Rules Look Like

Most first attempts at AGENTS.md read like a mission statement. Agents can't do anything with "we value clean code". What works is the same thing that works for a contractor on day one: specific, checkable instructions.

  • Commands, not philosophy. "Run npm test before proposing a change" beats "make sure things work".
  • Banned patterns, named. "Never build SQL with string concatenation; use the parameterised helper." Agents follow explicit don'ts well.
  • Where things go. Folder layout and naming patterns, with one real example of each.
  • Who owns what. "Files under /payments need a human approver from the payments team." This tells the agent to stop and ask.
  • Short. Long files get partially ignored. Push detail into skills and link to it.

A concrete example from our own world: TheMaximoGuys' Max_autoscripts repository ships a CLAUDE.md / AGENTS.md alongside TMG_AUTOSCRIPT_STANDARDS.md, a coding standard with ten must-follow rules — Jython 2.7 only, always use SqlFormat to avoid SQL injection, always close record sets in try/finally, never hardcode site or org values, never swallow exceptions. Those are exactly the mistakes an agent makes when nobody has told it otherwise. Written down, they become instructions the agent applies before a human ever sees the diff.

IBM is doing the same at the vendor level. Its Build Engineering team has published Bob skills such as maximo-code-optimization and maximo-java-conversion (Java business-object classes to automation scripts) in its public building-blocks repository. That's a skill in the truest sense: a packaged procedure for one specific, common enterprise job.

🤔 The Honest Caveat

House rules raise the floor. They don't guarantee the ceiling.

Agents still skip instructions, especially in long sessions or when rules conflict. A community practitioner who tested Bob on Maximo work (reports, application XML, Java-to-Jython conversions) came to a plain conclusion: output quality depended on the context supplied — business rules, naming, existing scripts. Rules files are how you supply that context consistently, but "consistently supplied" is not "always obeyed".

So keep the safety net. IBM's own explainer advises teams to "treat any AI-derived code or modules as untrusted input." Linters, tests, secret scanners and a human reviewer still own the final yes. The house rules just mean that reviewer spends their time on design questions instead of re-flagging the banned logger for the fifth time this week.

There's also a maintenance cost. Rules go stale. A rule file that still says "use Java 8" after the upgrade will confidently steer the agent wrong. Put a name and a review date on it.

🚀 Start This Week

  1. Run your tool's generator. Bob's /init, Kiro's "Generate Steering Docs" and similar commands draft a first version from your code. Treat it as a draft, then trim.
  2. Add your top five "we always fix this in review" items as explicit rules.
  3. Pick one repetitive task and write it up as a skill.
  4. Review the file in a pull request with the team, so it becomes a shared standard rather than one person's opinion.
  5. Add one line per repeat mistake. That's the whole maintenance process.

Key Takeaways

  • Methodology beats prompting. Write standards down once, in files the agent reads every time.
  • AGENTS.md is the portable layer — an open format read across tools; rule folders, skills and MCP sit on top.
  • Specific beats aspirational. Commands, banned patterns, folder layouts and ownership — not mission statements.
  • Rules raise the floor, not the ceiling. Keep tests, scanners and human review in place.
  • An AGENTS.md is now part of repo readiness, right next to the README and the CI pipeline.

References

🧰 From TheMaximoGuys toolbox: Max_autoscripts — open source (MIT) — ships an AGENTS.md, a ten-rule coding standard and 67 sample scripts. Point Claude, Bob, Copilot or Cursor at it and your agent starts with Maximo house rules on day one.

Series Navigation

Previous:Part 10 — Reading the Productivity Numbers
Next:Part 12 — What This Means for Maximo & EAM Shops
Series Index:Enterprise Vibe Coding