Build & submit taskBetaintermediate

Author a CLAUDE.md Hierarchy That Actually Steers a Monorepo

Take a small two-package monorepo that ships with no CLAUDE.md at all, author the root guidance file plus one package-level override, then drive Claude Code to implement a stub in each package. The two implementations must come out following diverging planted conventions (a JSDoc rule and a [shopkit] log prefix at the root, a Google-style docstring rule and an [inv] prefix inside the inventory package), and a local self-check verifies that divergence mechanically. That is your proof the hierarchy and the override actually reached the model. Submit the guidance files, the generated code, and the evidence for instant, rubric-based feedback.

1 hr

Est. time

4

Outcomes

5

Rubric criteria

65%

Pass score

What you'll learn

Skills you'll have real reps in after shipping this.

CLAUDE.md resolves as a hierarchy (enterprise, user, project root, subdirectory) and the file closest to the code wins for its own scope, which is how one repo can carry different conventions per package.
@-path imports let the root file pull shared docs into context, so conventions live in one place and every session inherits them.
CLAUDE.md is advisory: it steers what the model writes, and the honest way to trust it is to verify its effect in the produced code. Hard enforcement belongs to hooks, which come later in this course.
A planted pair of diverging conventions (same dimension, different value per scope) is a cheap, mechanical test of whether your guidance actually reaches the model.

The scenario

Your team runs Claude Code across a monorepo where one set of instructions cannot speak for every package: the storefront is plain-Node JavaScript with its own logging and documentation habits, and the inventory service is standard-library Python with different ones. Pasting the right conventions into every prompt does not scale, and it transfers to exactly zero teammates. CLAUDE.md is the mechanism built for this: a memory file Claude Code loads into context at the start of a session, resolved as a hierarchy (enterprise, user, project root, subdirectory), where the file closest to the code wins for its own scope and @-path imports let one root file pull in shared docs.

This task makes you build that hierarchy and then catch it in the act. You author the root CLAUDE.md and a package-level override for packages/inventory, each stating deliberately diverging conventions, then have Claude Code implement one stub per package. If the storefront code comes out logging with [shopkit] while the inventory code logs with [inv], the override provably took effect, and check.py confirms it mechanically and writes your evidence. One accuracy point runs through the whole task: CLAUDE.md is advisory guidance the model reads, which is exactly why you test that it landed; hard enforcement is what hooks are for, and those come in a later level.

Your role

You are the engineer who owns agent guidance for a monorepo. Your deliverable is a working CLAUDE.md hierarchy (a root file with an @-path import plus one package override) and machine-verified proof that Claude Code followed each file in its own scope, packaged as a single submission.

Start the task to unlock the full brief

You'll get the step-by-step requirements, setup commands, the 5-criterion grading rubric, tips, and the ability to submit your solution for instant AI grading.

Free to start · submit when you're ready

Prove your CLAUDE.md hierarchy steers Claude Code, package by package

Every serious Claude Code setup starts with CLAUDE.md, the memory file the agent loads at the start of a session, and the skill this task builds is making that file actually work across a monorepo. You author a root CLAUDE.md with an @-path import of shared conventions plus a package-level override, then drive Claude Code to implement one stub in each package and catch the hierarchy in the act: the JavaScript comes out documented and logging one prefix while the Python comes out with Google-style docstrings and a different prefix, because the file closest to the code wins for its scope. A local self-check verifies the divergence mechanically, runs both test suites, and generates your evidence. You come away knowing how to write scoped, concise agent memory, how to verify guidance reached the model instead of assuming it did, and where advisory steering ends and hook-based enforcement begins.

Frequently asked questions

Do I need a live Claude Code session to finish this task?

Yes, and that is the point: the two stub implementations must be produced by Claude Code working under your CLAUDE.md files, and your transcript captures the moment the override was read or applied. The verification side is deterministic though: check.py runs both test suites and confirms the diverging markers locally, so you get instant feedback between session runs.

What actually proves the override took effect?

The kit plants one dimension with two values: log lines must start with [shopkit] repo-wide but with [inv] inside packages/inventory, alongside a JSDoc rule at the root and a Google-style docstring rule in the package. When the generated JavaScript and Python each carry their own scope's markers and both test suites pass, the file closest to the code demonstrably won, and check.py writes evidence saying exactly that.

Why use CLAUDE.md for conventions instead of a hook?

CLAUDE.md is advisory context the model reads, which makes it the right tool for steering style, conventions, and repo knowledge cheaply across every session. Hooks are executable policy that can block an action outright, and they cost more to build and maintain. This task teaches the steering layer and how to verify it; a later level of the course adds hard enforcement with hooks.