THE FUTURE MARKETACADEMY
Your classroomRoom 01 · AI Lab
School of AI

AI Engineering Practice: ship and maintain AI-built software

Step 7 of 7 in AI Lab

This is the last course in this building's path. All learning paths

What you'll be able to do
  • Write short engineering standards for AI-assisted code, and put each rule where it is actually enforced.
  • Set up a review pipeline for AI-written changes: self-review, a fresh reviewer, code owners and branch protection.
  • Use tests as gates, check that the tests themselves are strong enough, and run them in CI.
  • Add security checks: secrets, dependencies, permissions, a security pass and a human who is qualified to sign off.
  • Run Claude Code in scripts and CI with limits on tools, turns, cost and who can trigger it.
  • Ship in small steps, undo mistakes quickly and keep AI-built software maintainable.
  • Lead a small team with a written workflow, and teach it to others.

Before this course: Claude Code Projects: larger codebases, tests and git (course 1.5.3). You should already have used plan mode, a written SPEC.md, tests as the pass or fail loop, a Stop hook, branches and small commits, worktrees, a read-only reviewer subagent, deny rules and /clear and /usage. Courses 1.5.1 (Coding with AI) and 1.5 (Claude Code Basics) come before that. This is the expert level. One person with good habits becomes a team with shared standards, and "it works on my laptop" becomes "it is checked, reviewed, safe to ship and easy to maintain". You need Python 3.9 or newer, Git, and a terminal. Code marked "tested" was run for this course with plain Python and Git. Workflow files marked "from the docs" are shown as Anthropic documents them and were not run here, because they need a GitHub repository and an API key.

Words in this course 68Open the Vocabulary Hall
01

Engineering standards: say it once, enforce it where it counts

In simple words

A restaurant kitchen has a few rules on the wall ("wash hands") and a few rules built into the equipment (the oven turns off if the door opens). A wall poster can be forgotten. A built-in lock cannot. Good engineering standards use both, and they know which rule belongs where.

Key facts
  • Anthropic's Claude Code best-practices page splits instructions in two kinds. Guidance (your prompt, CLAUDE.md, skills) is read by the model, which "usually follows" it but is not forced to. Enforced rules (hooks, permission rules, managed settings, tests, CI) are applied by Claude Code or by your pipeline and do not depend on the model's choice.
  • The docs' advice: if you keep adding emphasis to a CLAUDE.md line and Claude still misses it, the line belongs in a hook. The reverse holds too: if you have hooks for things that are only preferences, delete them and let Claude decide.
  • CLAUDE.md loads into every session, so each line costs a little attention on every task. Keep it for what Claude cannot work out from the code: the exact test, typecheck and lint commands, decisions that are not in the repo, and gotchas. Personal preferences go in CLAUDE.local.md, which you add to .gitignore.
  • Claude Code reads settings from several places. The scope decides who a setting affects: user (~/.claude/settings.json, you in every project), shared project (.claude/settings.json, everyone in the repo if committed), project local (.claude/settings.local.json, you in one project) and managed (set by an organization; nothing in your own files overrides it).
  • Precedence, highest first: managed settings, command-line --settings, project local, shared project, user. List settings such as permissions.allow merge across files instead of replacing each other.
  • Some keys never take effect from a file committed in the repo, and some, such as allow rules, wait until each teammate trusts the folder. deny and ask rules apply right away. Run /status to see which settings sources are loaded.
  • Standards are only useful if people can find and use them. Write one short engineering standards file (we call it ENGINEERING.md in this course) and link to it from CLAUDE.md.
RuleGuidance or enforced?Where it lives
"Use clear names for functions"GuidanceCLAUDE.md
"Run python3 -m unittest before you say you are done"Guidance, plus enforced by a Stop hook and CICLAUDE.md, .claude/settings.json, CI
"Never read .env"Enforcedpermissions.deny rule
"Nothing merges without a passing test run and one human approval"EnforcedBranch protection (Lesson 2)
"Do not touch the migrations/ folder"EnforcedPreToolUse hook that exits with code 2
Step by step
  1. Write down every rule your team follows or wishes it followed, one per line, in plain words.
  2. For each rule, ask: is "almost always" good enough? If yes, it is guidance. If no, it is a rule that needs enforcement.
  3. Put guidance in CLAUDE.md, keeping the file short. Include the exact commands for test, typecheck and lint.
  4. For each enforced rule, choose the mechanism from the table and write it down: a deny rule, a hook, branch protection or CI.
  5. Create the real files: .claude/settings.json with your shared rules, committed to the repo, and .claude/settings.local.json for personal overrides, kept out of Git.
  6. Write ENGINEERING.md in one page with three sections: how we work, how we review, how we ship.
  7. Run /status and check the settings sources look as you expect.
  8. Check: a new teammate can find the test command in under a minute, and you can point to the exact place where each "never" rule is enforced.
Watch on YouTube
Claude Code best practices from AnthropicAnthropic · YouTube · youtube.com
Hooks in Claude CodeClaude · YouTube · youtube.com

Videos by other creators on YouTube, for reference. They are not made by or affiliated with The Future Market.

LESSON 01Engineering standards: say it once, enforce it where it counts
LESSON 01 / ANIMATED LESSON / AI VOICE00:00 / 01:10
Read the video script
[Host] "A poster on the wall can be ignored. A lock on the door cannot."
[Text on screen: Guidance vs enforced] "Some rules are guidance, like a note in CLAUDE.md. Some are enforced, like a deny rule or a required check."
[Screen: the rules table] "Ask one question for each rule: is almost always good enough?"
[Text on screen: Keep CLAUDE.md short] "If not, move it out of the notes and into a hook, a permission rule or your pipeline."
[Host] "Short notes, strong locks, and one page everyone can find."
Try it now

Write your team's rule list (at least ten rules), sort it into guidance and enforced, and create the files that hold each. Then write ENGINEERING.md on one page.

ClaudeStuck? Copy a ready-made prompt for Claude

Copy this, open Claude, paste it, and Claude will walk you through the lesson step by step.

For a grown-up: Claude is for adults (18+). Copy this, paste it into Claude, and use the answer to explain the lesson to your child.

I'm learning "AI Engineering Practice: ship and maintain AI-built software" on The Future Market. Lesson 1: "Engineering standards: say it once, enforce it where it counts".

What the lesson teaches:
- Anthropic's Claude Code best-practices page splits instructions in two kinds. Guidance (your prompt, CLAUDE.md, skills) is read by the model, which "usually follows" it but is not forced to. Enforced rules (hooks, permission rules, managed settings, tests, CI) are applied by Claude Code or by your pipeline and do not depend on the model's choice.
- The docs' advice: if you keep adding emphasis to a CLAUDE.md line and Claude still misses it, the line belongs in a hook. The reverse holds too: if you have hooks for things that are only preferences, delete them and let Claude decide.
- CLAUDE.md loads into every session, so each line costs a little attention on every task. Keep it for what Claude cannot work out from the code: the exact test, typecheck and lint commands, decisions that are not in the repo, and gotchas. Personal preferences go in CLAUDE.local.md, which you add to .gitignore.
- Claude Code reads settings from several places. The scope decides who a setting affects: user (~/.claude/settings.json, you in every project), shared project (.claude/settings.json, everyone in the repo if committed), project local (.claude/settings.local.json, you in one project) and managed (set by an organization; nothing in your own files overrides it).
- Precedence, highest first: managed settings, command-line --settings, project local, shared project, user. List settings such as permissions.allow merge across files instead of replacing each other.
- Some keys never take effect from a file committed in the repo, and some, such as allow rules, wait until each teammate trusts the folder. deny and ask rules apply right away. Run /status to see which settings sources are loaded.
- Standards are only useful if people can find and use them. Write one short engineering standards file (we call it ENGINEERING.md in this course) and link to it from CLAUDE.md.

The exercise I'm working on:
Write your team's rule list (at least ten rules), sort it into guidance and enforced, and create the files that hold each. Then write ENGINEERING.md on one page.

I'm stuck. Please:
1. Explain the main idea in plain, simple words with one everyday example.
2. Walk me through the exercise one small step at a time. Ask me what I've done so far before giving the next step.
3. Don't just give me the final answer. Help me do it myself, and check my work when I share it.
I'm a parent helping my child (about 8 years old) with a lesson called "Engineering standards: say it once, enforce it where it counts" from the course "AI Engineering Practice: ship and maintain AI-built software".

Here's what the lesson says:
A restaurant kitchen has a few rules on the wall ("wash hands") and a few rules built into the equipment (the oven turns off if the door opens). A wall poster can be forgotten. A built-in lock cannot. Good engineering standards use both, and they know which rule belongs where.

The activity:
Write your team's rule list (at least ten rules), sort it into guidance and enforced, and create the files that hold each. Then write ENGINEERING.md on one page.

Please explain this so an 8-year-old understands: short sentences, a fun everyday example, and no hard words.
Then give me 3 simple questions I can ask my child to check they understood, and a way to do the activity together, one tiny step at a time.
Open Claude
Sources
My notes
02

A review pipeline for code you did not write

This lesson is part of full access: every course and every level for one payment.

03

Tests as gates, and checking the tests themselves

This lesson is part of full access: every course and every level for one payment.

04

Security checks for AI-assisted code

This lesson is part of full access: every course and every level for one payment.

05

Claude Code in scripts and CI, with limits

This lesson is part of full access: every course and every level for one payment.

06

Ship in small steps and keep it maintainable

This lesson is part of full access: every course and every level for one payment.

07

Lead a small team and document the workflow

This lesson is part of full access: every course and every level for one payment.

++

Final project

This lesson is part of full access: every course and every level for one payment.

??

Quiz

  1. What is the difference between guidance and an enforced rule?

  2. Where should a "never read .env" rule live?

  3. Does an AI code review approve or block a pull request?

  4. Why does Code Review read REVIEW.md from the base branch and not from the pull request?

  5. What does a CODEOWNERS file do?

  6. What is a mutation check?

  7. How do you make a failing test block a merge?

  8. Which warning signs should a human reviewer look for in an AI-written diff?

  9. What does push protection do?

  10. Name three limits you set on an unattended Claude Code run.

  11. Why use --bare in scripts and CI?

  12. How do you undo a shipped commit and keep the history?

EX

Final exam

This lesson is part of full access: every course and every level for one payment.

CE

Certificate

This lesson is part of full access: every course and every level for one payment.