Skip to content

Commit 02a0e7d

Browse files
docs(CLAUDE.md): three lessons — pygments fix landed, LLM hallucination shapes, stash pop silent-skip
- Updated the mkdocs/pygments lesson to note the fix landed in PR #346: pymdown-extensions>=10.21,<11.0 in the docs extra. 10.21.0 is the upstream fix; CI was never broken, only stale local venvs locked to 10.20.x via uv.lock hit the crash. - New lesson: attune-author polish-pass hallucinations have six distinct shapes (CLI flag with inverted semantics, private-module imports, See-also cross-refs, numeric counts, route paths, missing security callouts). Three of six actively break readers. Root cause: LLM filling in surrounding scaffolding from priors rather than being constrained to source. Four-intervention ladder lives in attune-author#27 umbrella spec. - New lesson: 'git stash pop' silently skips overwriting tracked files when the destination branch tracks files the stash treated as untracked. No conflict marker, no warning. Hit this session during ops-dashboard regen — 3 of 11 regenerated files silently dropped onto a fresh branch. Diagnostic: 'git diff stash@{0} -- <path>' after pop catches the silent skip. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 986fab1 commit 02a0e7d

1 file changed

Lines changed: 74 additions & 5 deletions

File tree

.claude/CLAUDE.md

Lines changed: 74 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2870,11 +2870,17 @@ attune_redis/ # attune-redis plugin (pip install attune-redis)
28702870
fence). Before wasting time investigating local doc
28712871
changes, check with `git stash && mkdocs build` on
28722872
the pre-change tree — if it still crashes, you've
2873-
ruled out the current PR. Fix direction (not done
2874-
this session): pin compatible `pygments` /
2875-
`pymdown-extensions` versions in the docs extra, or
2876-
find the specific markdown file whose fence
2877-
triggers the None filename.
2873+
ruled out the current PR. **Fix landed in PR #346
2874+
(2026-05-14): bump `pymdown-extensions>=10.21,<11.0`
2875+
in the docs extra. 10.20.x passes `title=None`
2876+
through as `filename`; 10.21.0 is the upstream fix.**
2877+
Companion finding: CI was never broken — PyPI fresh
2878+
installs picked up 10.21.3 cleanly. Only stale local
2879+
venvs locked to 10.20.x via `uv.lock` hit the crash.
2880+
Diagnostic when troubleshooting: read the CI build's
2881+
install log for the pymdown-extensions version; if
2882+
it's ≥ 10.21 and the build succeeded, your local
2883+
venv is the problem, not the repo.
28782884

28792885
- **Orphan top-level `docs/` directories stay
28802886
invisible to readers until wired into `mkdocs.yml`
@@ -4287,3 +4293,66 @@ attune_redis/ # attune-redis plugin (pip install attune-redis)
42874293
feature PR's production code should update the
42884294
markup-asserting tests in the same commit, or CI
42894295
will be 100% red until you do.
4296+
4297+
- **attune-author polish-pass hallucinations have six
4298+
distinct shapes — automated verification beats manual
4299+
editorial review at scale**: empirical regression
4300+
fixture from a single feature regen (ops-dashboard,
4301+
15 templates + 4 published docs, 2026-05-14 via
4302+
attune-ai PR #351). The polish pass invented (1) a
4303+
CLI flag with inverted semantics (`--allow-run` when
4304+
real is `--read-only`), (2) two private-module
4305+
imports (`from attune.ops._readers import …`,
4306+
`_models` — both `ModuleNotFoundError`), (3) four
4307+
"See also" cross-references to non-existent docs,
4308+
(4) a numeric count (`498 templates` vs real 259),
4309+
(5) two wrong route paths (`POST /run` vs real
4310+
`POST /workflows/{name}/run`), and (6) an insecure
4311+
example (`host="0.0.0.0"` without an auth callout).
4312+
Three of the six actively break readers who follow
4313+
the docs literally. **Root cause: the polish pass
4314+
has source as context but isn't *constrained* to
4315+
it — the LLM is free to invent surrounding
4316+
scaffolding from priors that "sounds right."** Four
4317+
interventions ranked by leverage (see
4318+
attune-author#27 umbrella spec for full design):
4319+
(a) AST-based post-generation fact-check
4320+
(Python-import resolution + CLI-flag-vs-`--help` +
4321+
Markdown-link-target + numeric-claim verification —
4322+
cheapest, no LLM cost, catches 5 of 6 fixture
4323+
errors); (b) inject ground-truth context (rendered
4324+
`--help`, `__all__`, dataclass fields) into the
4325+
polish prompt under sentinel tags; (c) reuse
4326+
`attune_rag.eval.faithfulness.FaithfulnessJudge` as
4327+
a post-step (catches missing-content errors like
4328+
the security callout that AST can't see); (d)
4329+
static-analysis (`mypy --strict`) of tutorial code
4330+
fences specifically — execution of LLM-generated
4331+
code is explicitly deferred for security reasons.
4332+
Pattern generalizes beyond attune-author: any
4333+
LLM-driven content-generation pipeline (doc gen,
4334+
README polish, blog draft) needs post-generation
4335+
verification proportional to how much surface
4336+
detail (names, flags, paths) the output references.
4337+
4338+
- **`git stash pop` silently skips overwriting tracked
4339+
files when the destination branch tracks files the
4340+
stash treated as untracked**: hit 2026-05-14 when
4341+
stashing untracked-on-branch-A files (because branch
4342+
A predated their addition to main), switching to a
4343+
new branch off origin/main (where they ARE tracked),
4344+
and popping. The stash entry was retained ("kept in
4345+
case you need it again") but 3 of 11 files in the
4346+
stash were silently dropped from the working tree —
4347+
the tracked versions from the new branch's HEAD
4348+
stayed in place, my stashed regenerated versions
4349+
vanished. No conflict marker, no warning. Diagnostic
4350+
to catch the silent skip: after `git stash pop`,
4351+
diff the affected files against the stash with
4352+
`git diff stash@{0} -- <path>` before dropping. If
4353+
there's a non-empty diff and `git status` shows the
4354+
file unchanged, the pop silently skipped it.
4355+
Mitigation when planning the stash: if you know the
4356+
destination branch tracks files your source branch
4357+
doesn't, pop with `git checkout stash@{0} -- <files>`
4358+
to force the overwrite, then drop manually.

0 commit comments

Comments
 (0)