Anthropic's prompting guide for Claude Fable 5.2 says one sentence about ownership changes how the model edits code. Told that it owns and maintains the codebase, it merged duplicated code in about 75% of test runs, against under 10% without the sentence. The cost was roughly 70 to 80% more output tokens, plus unrequested changes that its summaries often left out. Before you add it to an iOS repo, audit your CLAUDE.md and rules files for old cautious rules, limit the sentence to a module you want rebuilt, and check every diff against the scope you asked for.
On 10 November, Simon Willison quoted one paragraph from Anthropic's new guide, Prompting Claude Fable 5.2, and it travelled fast among people who use coding agents every day. The claim is simple. Claude Fable 5.2 pays close attention to what your prompt says about who owns the code. Tell it the code belongs to someone else, or say nothing, and it tends to bolt new work onto the structure that is already there, even when that means copying code. Tell it the codebase is its own and it starts merging the duplicates.
If you build iOS apps with Claude Code, that paragraph is about your CLAUDE.md file. The same guide has two less quoted sections that matter just as much: one says old cautious rules pile up and slow the model down, and one lists prompt habits from earlier models that now cost money or stop working. This post walks through what the guide says, what it means for a Swift repo, and two small scripts: one that audits your instruction files before you add anything, and one that checks the diff after the agent has worked, so you can see what it changed beyond what you asked for.
What Anthropic's guide says about ownership
The section is called "Say who owns the code" and it sits under coding agents. On the page as read on 12 November, Anthropic suggests this sentence:
You are the owner and long-term maintainer of this codebase, and its design is up to you.
In Anthropic's tests, the model merged duplicated code in under 10% of runs without that sentence and in about 75% of runs with it. The guide is just as direct about the costs. Output tokens rose by roughly 70 to 80%. The model made changes nobody asked for, many of them new tests and documentation. In some runs it changed how an existing feature behaves. Its pull request summaries often left out small changes, so Anthropic tells you to review both the diff and the summary.
One more detail is easy to miss. A scope rule does not cancel the effect. Even with a line like "No drive-by refactors, renames or cleanups" earlier in the prompt, the model still consolidated code in more than half of runs. The guide's advice is to leave the ownership sentence out where the user owns the code and wants minimal change.
A note on versions: Simon Willison's post quotes a different sentence ("This codebase is yours...") and a different result (about half of runs). The page as read two days later shows the wording above and the 75% figure, so the page appears to have been revised. Use the current page as the reference, and expect it to change again.
Why this matters more in an iOS repo
An iOS project has files where a well meant cleanup does real damage. The Xcode project file, Info.plist, entitlements, the privacy manifest, build settings and schemes all sit next to your Swift code. A model that has been told the design is its call may decide to tidy the target structure or rename a scheme, and the result can build fine on your Mac and still break CI, signing or a feature flag.
The behaviour change risk is the bigger one. Anthropic reports that in some ownership runs the model changed how an existing feature behaves. In an app that is already live, a quiet behaviour change in onboarding, purchases or permissions is the kind of thing users notice before you do. So the useful question for each part of your repo is who should own it. A module you want rebuilt cleanly is a good candidate for the ownership sentence. Code with a release next week is not.
Founders who built their first version with an AI tool often have exactly the repo where this helps: three copies of the same networking helper, view models that grew by pasting, and no tests. Consolidating that is valuable. It is also exactly where you need to see every change, because there are no tests to catch a behaviour shift.
Step 1: find out which instruction files Claude Code actually loads
Before you add a sentence anywhere, check what is already loaded. Claude Code's memory documentation lists the places it reads instructions from:
./CLAUDE.mdor./.claude/CLAUDE.mdfor the project, shared with your team through git../CLAUDE.local.mdfor your own notes on this project, which you add to.gitignore.~/.claude/CLAUDE.mdfor instructions that apply to all your projects../.claude/rules/*.mdfor project rules, which can be limited to certain paths withpathsfrontmatter.- Auto memory under
~/.claude/projects/<project>/memory/MEMORY.md, where Claude Code saves notes for itself. The first 200 lines or 25 KB load at the start of each session.
Run /memory inside a Claude Code session. It lists the CLAUDE.md, CLAUDE.local.md and rules files loaded in that session, and the docs say that if a file is not listed, Claude cannot see it. The same page recommends keeping each CLAUDE.md under 200 lines, since longer files use more context and reduce how closely the model follows them. Anthropic Tested How AI Agents Remember. Shrink and Fix Your Claude Code Memory in an iOS Repo goes through that cleanup step by step.
Look at auto memory too. It is plain markdown and you can edit or delete it. Notes that an agent wrote to itself months ago, after one bad build, are exactly the kind of accumulated caution the Fable 5.2 guide warns about.
Step 2: clean out the old rules first
Section 6 of the guide is called "Keep caution from piling up". Cautious instructions build up through memory, notes and instruction files, and Fable 5.2 follows them closely. The result is needless approval requests, especially when several agents work together. The guide asks for four things:
- Remove notes you no longer need. A rule such as "never retry" keeps being followed long after the reason is gone.
- Name the steps that need no approval. "Act more freely" is too vague; list the routine steps the model can take on its own.
- Check validation steps. A condition like "stop and review at the first error" can block an unattended run. Remove it or narrow it.
- Be explicit about exceptions. The model treats "never" as absolute. If you want it to keep responsibility for an action, write "ask for approval before deleting files" instead of "never delete files".
Section 7 lists habits from earlier models that the guide says to review:
- Standing instructions to delegate to subagents. Remove them if the model starts more subagents than the task needs.
- A token budget written into the prompt. A large displayed budget increased spending, and removing it lowered cost at high and xhigh effort with equivalent results. This is about text in the prompt, not the API's task budgets feature.
- "Treat that answer as done" lines from the Opus 5.5 guide. At high effort they made the model much less likely to point out mistakes in earlier answers.
- "Think less" instructions. They worked on Fable 5.1 but do not stop thinking at medium effort and above on 5.2. The guide says to remove them and lower effort instead.
- Hard style limits such as "one instruction per sentence, in 20 words or fewer". The model follows them so closely that its writing gets choppy.
For an iOS repo, the usual suspects are lines like "Never touch the project file", "Always ask before running xcodebuild" and "Stop if any test fails". Some of those are good rules. Rewrite them with a scope and a reason: "Ask before editing the .pbxproj file, because merge conflicts there are painful to fix" tells the model what you are protecting.
The audit script
This script reads the instruction files listed above and prints every line that matches one of the patterns from sections 6 and 7. It does not change anything. It is a reading list for you, and many of the lines it flags will be fine once you have looked at them.
#!/usr/bin/env bash
# claude-md-audit.sh: list instruction lines that Anthropic's Fable 5.2
# prompting guide says to review (sections 6 and 7).
# Usage: ./claude-md-audit.sh [repo-root] (default: current folder)
set -u
root="${1:-.}"
files=()
for f in "$root/CLAUDE.md" "$root/.claude/CLAUDE.md" "$root/CLAUDE.local.md" \
"$HOME/.claude/CLAUDE.md"; do
[ -f "$f" ] && files+=("$f")
done
while IFS= read -r f; do files+=("$f"); done < <(
find "$root/.claude/rules" "$root/.claude/agents" "$root/.claude/skills" \
-name '*.md' -type f 2>/dev/null)
if [ ${#files[@]} -eq 0 ]; then echo "No instruction files found under $root"; exit 0; fi
check() { # label, regex
local label="$1" re="$2" hits
hits=$(grep -n -i -E "$re" "${files[@]}" 2>/dev/null)
if [ -n "$hits" ]; then
echo "== $label"
echo "$hits" | sed 's/^/ /'
fi
}
for f in "${files[@]}"; do
n=$(wc -l < "$f")
[ "$n" -gt 200 ] && echo "== Over 200 lines: $f ($n lines)"
done
check "Absolute rules (rewrite with scope and reason)" '\b(never|always|under no circumstances|do not ever)\b'
check "Standing delegation lines" '(subagent|sub-agent|delegate|spawn (an )?agent)'
check "Token or budget numbers shown to the model" '(token budget|[0-9]+k? tokens|budget of)'
check "Think-less lines (lower effort instead)" "(think less|don.t think|without (thinking|deliberat)|no need to think|answer immediately)"
check "Treat-as-done lines" '(treat (that|the|this) answer as (done|final)|do not revisit)'
check "Hard style limits" '([0-9]+ words or (fewer|less)|one instruction per sentence)'
check "Stop-at-first-error rules" '(stop (and|at|on) (the )?first (error|failure)|stop and (ask|review) (at|on|after) (any|the first))'
check "Never-retry rules" "(never retry|do not retry|don.t retry)"
check "Ownership wording already present" '(owner and long-term maintainer|this codebase is yours|its design is up to you)'
echo "Scanned ${#files[@]} file(s)."
Run it from the repo root with ./claude-md-audit.sh. It was tested on Linux with GNU grep against a sample folder holding a CLAUDE.md, a path scoped rule and an agent file; it flagged each planted line, including the ownership sentence. It skips auto memory on purpose, because that folder name depends on your project path. Open it with /memory and read it yourself. The regular expressions are rough. "Never" catches "never force unwrap", which is a style rule you probably want to keep. Treat every hit as a question, not a defect.
The audit script on a Mac
The script was also run on macOS 26.0.1 with the system's bash 3.2 and BSD grep, against a sample repo with a CLAUDE.md, a path-scoped rule and an agent file. It printed nine groups and flagged every planted line. Part of the output is worth seeing before you run it on your own files.
== Absolute rules (rewrite with scope and reason)
repo/CLAUDE.md:2:- Never touch the project file.
repo/CLAUDE.md:3:- Always ask before running xcodebuild.
repo/CLAUDE.md:5:- Never force unwrap optionals.
repo/CLAUDE.md:9:- Never retry a failed network test.
== Never-retry rules
repo/CLAUDE.md:9:- Never retry a failed network test.
Line 5 is the false alarm the note above warns about: a Swift style rule caught by the word "never". Line 9 appears twice because it matches two patterns. So count the lines to review by file and line number and not by the number of hits. In this sample, 12 hits came from 11 distinct lines.
The script also reads ~/.claude/CLAUDE.md, your personal file, and prints its lines with the rest. That is intended, since those instructions load in every project. Remember it before you paste the output into an issue or a chat.
Step 3: decide where the ownership sentence goes
You have three reasonable places, and they behave differently.
The project CLAUDE.md applies the sentence to everyone on the team, for the whole repo, in every session. That fits a young codebase that one person controls and wants consolidated. It is the wrong place for a repo with code you are about to ship, because the guide says a scope rule elsewhere in the prompt will not reliably hold the model back.
CLAUDE.local.md applies it only for you. That suits a solo developer who wants to try it before a teammate gets surprised by a large pull request.
In a larger app, a path scoped rule is the option worth trying first. Claude Code supports rules files with paths frontmatter, and per the docs those load on demand when Claude reads matching files. A rule like this one limits the sentence to a module you actually want rebuilt:
---
paths:
- "Features/Onboarding/**"
---
You are the owner and long-term maintainer of this codebase, and its design is up to you.
Keep public types used by other features source compatible.
Two cautions. First, nobody here has measured whether a path scoped ownership line produces the same consolidation rate as Anthropic's tests; their numbers come from their own setup, and you should measure on your repo. Second, once the rule has loaded because Claude read an onboarding file, it stays in context for the rest of the session, so later edits in other folders may still feel its effect. Keep sessions focused on one area when you use it.
Whatever you pick, add the sentence in a new session. The guide warns that the API enforces a prefix check, so a stored conversation resumed with changed instruction text can fail with a 400 error. In Claude Code terms, start a fresh session after editing CLAUDE.md instead of expecting a running one to pick up the change cleanly.
Step 4: check what the agent actually changed
The guide says pull request summaries often left out small changes. So do not judge the work by the summary. Before you start, write down which folders the task should touch. After the agent finishes, compare that list with the real diff.
The scope check script
#!/usr/bin/env bash
# scope-check.sh: compare what an agent changed against what you asked for.
# Usage: ./scope-check.sh <base-ref> <allowed-glob> [<allowed-glob> ...]
# Example: ./scope-check.sh main 'Features/Onboarding/*' 'OnboardingTests/*'
set -u
base="$1"; shift
allowed=("$@")
changed=$( { git diff --name-only "$base"...HEAD; git diff --name-only; \
git ls-files --others --exclude-standard; } | sort -u)
[ -z "$changed" ] && { echo "No changes since $base."; exit 0; }
outside=(); sensitive=(); newtests=()
while IFS= read -r f; do
ok=0
for g in "${allowed[@]}"; do [[ "$f" == $g ]] && ok=1; done
[ $ok -eq 0 ] && outside+=("$f")
case "$f" in
*.pbxproj|*Info.plist|*.entitlements|*PrivacyInfo.xcprivacy|*Package.resolved|*.xcscheme|*.xcconfig)
sensitive+=("$f");;
esac
if [[ "$f" == *Tests* ]] && ! git cat-file -e "$base:$f" 2>/dev/null; then newtests+=("$f"); fi
done <<< "$changed"
echo "Changed files: $(echo "$changed" | wc -l | tr -d ' ')"
git diff --shortstat "$base"...HEAD 2>/dev/null | sed 's/^/Committed: /'
[ ${#outside[@]} -gt 0 ] && { echo "Outside the scope you gave:"; printf ' %s\n' "${outside[@]}"; }
[ ${#sensitive[@]} -gt 0 ] && { echo "Project, signing or privacy files touched:"; printf ' %s\n' "${sensitive[@]}"; }
[ ${#newtests[@]} -gt 0 ] && { echo "New test files:"; printf ' %s\n' "${newtests[@]}"; }
[ ${#outside[@]} -eq 0 ] && [ ${#sensitive[@]} -eq 0 ] && echo "Everything is inside the scope you gave."
exit 0
Usage looks like this, run from the branch the agent worked on:
./scope-check.sh main 'Features/Onboarding/*' 'OnboardingTests/*'
It lists files outside the folders you named, project, signing and privacy files that changed (the .pbxproj file, Info.plist, entitlements, PrivacyInfo.xcprivacy, Package.resolved, schemes and .xcconfig files), and test files that did not exist on the base branch. It counts committed changes, uncommitted edits and new untracked files together. It was tested in a throwaway git repo where an agent branch touched an allowed file, a file in another feature, the project file and a new test file; it reported each one in the right group. The pattern match uses bash globbing, where * also matches slashes, so 'Features/Onboarding/*' covers subfolders.
New test files are listed on purpose. Anthropic says many of the unrequested changes were new tests and documentation. New tests are usually welcome, but read them: a test written to match changed behaviour will pass and hide the change you need to catch.
Count the duplicates before and after
The guide's numbers are about merging duplicated code, so give yourself a number for that too. Otherwise the only evidence that the ownership sentence did anything is a larger diff. This script counts runs of identical lines that appear in more than one place in your Swift files. It ignores blank lines, comment lines and lone braces, and it skips Pods and build folders.
# dup-blocks.py: count runs of identical Swift lines that appear in more than
# one place. Run it before and after a refactoring session and compare.
# Usage: python3 dup-blocks.py [path] [lines-per-block] (default: . and 6)
import hashlib, os, sys
from collections import Counter, defaultdict
root = sys.argv[1] if len(sys.argv) > 1 else "."
size = int(sys.argv[2]) if len(sys.argv) > 2 else 6
skip = {".git", ".build", "Pods", "DerivedData", "Carthage"}
seen = defaultdict(list)
for folder, dirs, files in os.walk(root):
dirs[:] = [d for d in dirs if d not in skip]
for name in files:
if not name.endswith(".swift"):
continue
path = os.path.relpath(os.path.join(folder, name), root)
with open(os.path.join(folder, name), encoding="utf-8", errors="replace") as f:
code = [l.strip() for l in f]
code = [l for l in code if l and not l.startswith("//") and l not in ("{", "}")]
for i in range(len(code) - size + 1):
digest = hashlib.sha1("\n".join(code[i:i + size]).encode()).hexdigest()
seen[digest].append(path)
pairs = Counter()
blocks = 0
for places in seen.values():
if len(places) > 1:
blocks += 1
files = sorted(set(places))
pairs[" + ".join(files) if len(files) > 1 else files[0] + " (twice in one file)"] += 1
print(f"repeated {size}-line blocks: {blocks}")
for where, count in pairs.most_common(5):
print(f" {count:>3} {where}")
Run with Python 3.12 on a sample project where the same request-and-decode helper had been pasted into three loaders, it printed:
repeated 6-line blocks: 7
7 App/Feed/FeedLoader.swift + App/Profile/ProfileLoader.swift + App/Shared/OrdersLoader.swift
After the three copies were replaced by one shared client, which is the kind of change the ownership sentence is meant to encourage, it printed "repeated 6-line blocks: 0". The count is a rough measure. One pasted function of twelve lines shows up as seven overlapping blocks, and code that was copied and then edited slightly is not counted at all. What it gives you is a before and after for the same repo. If the number does not move after a session that cost 70 to 80% more output, the sentence did not buy what it is for.
The scope check above was run on macOS as well, with bash 3.2, in a throwaway repo with the same four kinds of change plus an untracked file. It reported the paywall file and the project file as outside the scope, the project file again under signing and privacy files, and the new test file. One limit showed up in that run. Called with no folder patterns at all, the script stops with an "unbound variable" error on bash 3.2, so always pass at least one pattern.
Step 5: watch the cost
The ownership sentence raised output tokens by about 70 to 80% in Anthropic's tests. The guide's "Finishing work" text, suggested for agentic work at low or medium effort, raised output by about 30% while halving sessions that ended with unfinished work. Put both in and you are paying noticeably more per task.
The guide's advice on effort helps here. Start at high, the API default, and rerun your own effort tests instead of carrying settings over from Fable 5.1 or Opus 5.5. Most of the gain comes from medium to high; above high, gains are uneven. Low is meant for quick, well specified tasks and high volume work such as subagents. A practical split for an iOS repo is to keep the ownership sentence for planned refactoring sessions at high effort, and leave it out of quick bug fixes where you want the smallest possible diff. Max Reasoning Effort Costs Up to 42x More on Easy Tasks. Set Your Coding Agent Like This has measurements for the effort side.
Check subagents too. The guide notes that subagents can make up much of a session's cost and that, at xhigh and max, Fable 5.2 used subagents to review its own work. If your CLAUDE.md or agent files tell the model to delegate, the audit script will show those lines.
What the two increases add up to
The two percentages are easier to weigh as token counts. Take a task that produces 10,000 output tokens today.
| Prompt | Output tokens | Change |
|---|---|---|
| As it is now | 10,000 | Baseline |
| With the ownership sentence | 17,000 to 18,000 | 70 to 80% more |
| With the "Finishing work" text | 13,000 | 30% more |
| With both, if the two effects multiply | 22,100 to 23,400 | 121 to 134% more |
The last row is an assumption. The guide reports each increase on its own and does not say what happens when you combine them, so the real figure could be lower or higher. It is still the right order of magnitude to plan with: the two additions together may more than double the output side of a task. Output tokens are priced higher than input tokens, so check your usage for a few sessions before and after, and keep the pair for work where a consolidated module is worth it.
A one hour plan for this week
- Open a Claude Code session in your repo and run
/memory. Write down every file it lists. - Run
claude-md-audit.shand read every hit. Delete stale cautions, add a scope and a reason to rules you keep, and list the routine steps that need no approval. - Open the auto memory folder and remove notes whose reason no longer holds.
- Pick one module you want consolidated. Add a path scoped rule with the ownership sentence and a line about which public types must stay compatible.
- Start a new session, give a refactoring task in that module, and run
scope-check.shon the result. - Run your test suite and the app. Compare the agent's summary with the diff, line by line.
- Note the token use and the time. Decide whether the cleanup was worth it before you spread the sentence further.
FAQ
Does this apply to Claude Code or only to the API?
The guide is written for the API and for anyone building prompts and harnesses. Claude Code sends your CLAUDE.md and rules files to the model as instructions, so the advice about ownership wording and old cautions applies to those files. Settings such as effort are set differently in Claude Code; check its own docs for the current options.
Will "No drive-by refactors" keep the model in scope?
Not reliably once the ownership sentence is in the prompt. Anthropic reports the model still consolidated code in more than half of runs with that rule present. If you want a minimal diff, leave the ownership sentence out.
Should every iOS repo use the ownership sentence?
No. Anthropic says to omit it where the user owns the code and wants minimal change. Use it where you actually want the model to restructure code and you have time to review a larger diff.
Is the 75% figure something I can expect?
It is Anthropic's result from its own tests, on the page as read on 12 November. An earlier quote of the page showed a different figure. Measure on your own repo.
How do I tell whether the model actually consolidated anything?
Measure it. Count repeated blocks before and after the session with the dup-blocks.py script in this post, and compare the diff with the folders you meant to change. A bigger diff with the same duplicate count means you paid for extra output and got no consolidation.
If you would rather start from a set of instruction files written for iOS work, there is Claude Code + Xcode: The Production iOS Workflow Kit in my Gumroad store. It is a ZIP with AGENTS.md and customizable CLAUDE.md templates, 8 rules files, 6 commands, 10 agents and a runnable SwiftUI and UIKit sample app. Its templates tell Claude to inspect first and discourage unnecessary rewrites, so it fits the minimal change side of this decision; if you add the ownership sentence, run the audit above against its files too.
Keep reading on JR Devhub

Comments