Fable from SGUP/AI (a GitHub repo that packages Fable as a Markdown operating profile) gives you that. You attach one plain .md file to your agent. It tells the model to stay scoped, explain each change, and keep edits reversible. You run it on a branch, get a focused patch, then review with a clear head.
Here is the quick way to try it. You will grab the profile, attach it to your coding agent, and run on a throwaway branch. I show this with aider (an open-source AI pair programmer for Git repos) plus Ollama (a local LLM runner). You can swap in your Opus 4.8 setup later.
First, clone the SGUP/AI repo and copy the profile file into your project. The file name is fable5.md inside the repo.
bash
git clone https://github.com/sgup/ai.git
In your project, make a new branch and drop in the profile:
- git checkout -b fable-field-test
- cp ../ai/fable5.md .
- Commit the profile so it is tracked.
Hook it to your agent. With aider you run: aider --system-prompt fable5.md on your repo. Ask for one small change like "Tighten the logger format in main.py only". Fable tells the agent to scope by file and explain each diff. Verify it worked by checking the patch and the chat notes. You should see a short commit touching only main.py, with a numbered explanation and a clear revert path. Stop here if you only want a preview. The full setup, per OS, is below when you want to run this for real.
Here is the quick way to try it. You will grab the profile, attach it to your coding agent, and run on a throwaway branch. I show this with aider (an open-source AI pair programmer for Git repos) plus Ollama (a local LLM runner). You can swap in your Opus 4.8 setup later.
First, clone the SGUP/AI repo and copy the profile file into your project. The file name is fable5.md inside the repo.
In your project, make a new branch and drop in the profile:
- git checkout -b fable-field-test
- cp ../ai/fable5.md .
- Commit the profile so it is tracked.
Hook it to your agent. With aider you run: aider --system-prompt fable5.md on your repo. Ask for one small change like "Tighten the logger format in main.py only". Fable tells the agent to scope by file and explain each diff. Verify it worked by checking the patch and the chat notes. You should see a short commit touching only main.py, with a numbered explanation and a clear revert path.
Setup
1) Pull the Fable profile
bash
git clone https://github.com/sgup/ai.git
ls ai | grep fable5.md
Copy fable5.md into the root of the repo you want to edit.
bash
cp ai/fable5.md /path/to/your/project/
cd /path/to/your/project
git checkout -b fable-field-test
git add fable5.md && git commit -m "chore: add Fable operating profile"
2) Install an agent you control
I use aider (edits files inside a Git repo with AI guidance). You can run it against a local LLM with Ollama, or your Opus 4.8 endpoint.
- macOS
- Install pipx and aider
bash
brew install pipx
pipx ensurepath
pipx install aider-chat
- Install Ollama and a local code model
bash
brew install ollama
ollama serve &
ollama pull qwen2.5-coder:7b
- Linux (Debian/Ubuntu)
- Install pipx and aider
bash
python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install aider-chat
- Install Ollama and a local code model
bash
curl -fsSL https://ollama.com/install.sh | sh
ollama serve &
ollama pull qwen2.5-coder:7b
- Windows 11
- Install pipx and aider in PowerShell
bash
py -m pip install --user pipx
py -m pipx ensurepath
pipx install aider-chat
- Install Ollama
bash
winget install Ollama.Ollama
# After install, launch Ollama app so it starts the local server
ollama pull qwen2.5-coder:7b
3) Attach Fable to the agent
Run aider in your repo with the profile as the system prompt. If you are using Ollama locally:
bash
aider --model ollama/qwen2.5-coder:7b --system-prompt fable5.md
If you want to target Opus 4.8 via your Anthropic key, export your key and select the Opus model:
bash
export ANTHROPIC_API_KEY=sk-ant-abc123_example_key_do_not_commit
aider --model anthropic/claude-3-5-opus-latest --system-prompt fable5.md
Open a second terminal and create a tiny, scoped request to verify behavior.
bash
echo "print('hello')" > demo.py
Back in aider, ask for a small edit only in demo.py, for example: "Replace the print with a function greet(name) in demo.py only. Do not touch other files. Explain the change and how to revert."
Verify
You should see aider plan and patch one file, with an explanation and a revert path. Example transcript:
text
Plan:
1) Edit demo.py only. Create greet(name) and call it in __main__.
2) Explain the change and provide a one-command revert.
Diff (demo.py):
- print('hello')
+ def greet(name: str) -> None:
+ print(f"hello {name}")
+
+ if __name__ == "__main__":
+ greet("world")
Explanation:
1) Scoped edit to demo.py only as requested.
2) Added greet(name) with type hints. Main guard calls greet.
3) Revert by: git checkout -- demo.py
Commit message:
chore(demo.py): replace print with greet(name); add main guard
Check Git to confirm a focused patch:
bash
git status --porcelain
git --no-pager show --stat
You should see only demo.py changed and a clear commit message.
Configuration tips
- Freeze scope by file. In your prompt ask Fable to target explicit paths. Example: "Only edit src/logging.py and tests/test_logging.py."
- Limit patch size. Start aider with a smaller context to keep diffs tight:
--editor-context 2048. - Disable auto-commits while experimenting. Use
--no-auto-commits, then stage and commit after reading the explanation. - Add a pre-commit guard. Use a simple hook to block multi-file edits during Fable runs:
bash
cat > .git/hooks/pre-commit <<'SH'
#!/usr/bin/env bash
if [ "$(git diff --cached --name-only | wc -l)" -gt 3 ]; then
echo "Too many files changed. Keep Fable patches focused."
exit 1
fi
SH
chmod +x .git/hooks/pre-commit
- Keep reversibility trivial. Ask Fable to always include a one-line revert in the explanation, like
git checkout -- <file>orgit revert -n <commit>.
Troubleshooting
- Aider cannot find the system prompt file
- Symptom: "File not found: fable5.md" - Fix: Run aider from the repo root where fable5.md lives, or pass an absolute path: --system-prompt $(pwd)/fable5.md.
- Ollama not responding on localhost
- Symptom: timeouts or connection refused to http://localhost:11434 - Fix: Start the server first with ollama serve and verify with curl http://localhost:11434/api/tags. If you changed the host, set OLLAMA_HOST=http://127.0.0.1:11434.
- Multi-file sprawl despite the profile
- Symptom: the agent edits many files at once - Fix: Restate scope in your first message with explicit file paths, and run aider with --no-auto-commits. If sprawl persists, lower --editor-context and repeat the request. Keep the branch clean between runs: git reset --hard && git clean -fd.
When it beats old instructions
- Surgical refactors. Rename a function used across the codebase without touching unrelated modules. Fable keeps the change confined to the files you name and documents the exact edits.
- Config nudges. Update a logger format or a linter rule. Instead of sweeping reformat commits, you get a single-file patch with a revert note.
- Test-first fixes. Ask for a failing test and a minimal fix in the same folder. You get one test file plus one code file, with a short explanation that maps to the diff.
- Release prep. Change a version string and a changelog entry only. Fable stops the agent from "helpfully" reformatting the whole repo.
Sources
Want a hand?
Book a 30-min call.
Walk through your stack with us. We'll find the bottleneck and map out the exact wiring you need — free.