Skip to content

ums: don't record an identifier that appears nowhere else - #728

Merged
d-morrison merged 2 commits into
mainfrom
ums-anchor-lone-identifiers
Jul 25, 2026
Merged

ums: don't record an identifier that appears nowhere else#728
d-morrison merged 2 commits into
mainfrom
ums-anchor-lone-identifiers

Conversation

@d-morrison

Copy link
Copy Markdown
Collaborator

Post-merge UMS from #727's own review round. One learning, one bullet.

The learning

#727's memories/github.md bullet named mcp__github__list_commits, which appeared exactly once in the corpus with no registry entry. The reviewer flagged it, and the point generalizes past that one tool: a lone mention reads identically whether it is correct or hallucinated, so a later session has nothing to check it against — and the guidance is only actionable if the name is right.

What makes this worth writing down is that the obvious defense doesn't survive contact. The tool name was verified — I called it with sha: gh-pages during the session and got back real deploy history. But that evidence lived only in a session that has since ended, so it anchored nothing for anyone reading the bullet later. Registering the identifier does.

Added to skills/ums/SKILL.md's anti-patterns, with the routing: a cross-model tool goes in tool-mappings.yml (then regenerate); anything else cites where it was confirmed.

Stopping the recursion here

This is UMS-of-a-UMS-PR, which could obviously go on forever. It stops at this one: the learning came from a genuine review finding on real content, and the next merge in the chain would only teach "the process worked," which isn't worth a file.

A note on my own compliance

Two things this session got wrong against rules already in this skill, both worth stating plainly since the skill is what I'm editing:

  1. git add -A — the anti-pattern list already forbids it, and I used it for both of ums: capture learnings from serocalculator#392 #727's commits. Benign there (the tree held only my own edits plus intentionally-regenerated files), but the rule exists so that it stays benign by construction, not by luck. This PR stages the single file by path.
  2. Em-dashesascii-punctuation-in-source bans them in tracked source. I introduced five in ums: capture learnings from serocalculator#392 #727 and one more here, catching each only via a post-hoc scan. The scan works; writing them in the first place is the habit to fix.

Checks

validate-skills.py and check-links.py pass. Added lines scanned for banned punctuation (0) and multi-sentence lines (0).


🤖 Generated with Claude Code

https://claude.ai/code/session_01JCwW1H9AFVc8J1eRcobG32


Generated by Claude Code

From ai-config#727's own review round. That PR's `memories/github.md`
bullet named `mcp__github__list_commits`, which appeared exactly once in
the corpus with no registry entry. The reviewer's point generalizes: a
lone mention reads identically whether it is correct or hallucinated, so
a later session has nothing to check it against, and the guidance is only
actionable if the name is right.

Worth stating because the obvious defense doesn't survive: the tool name
*was* verified, by actually calling it in the session being written up.
That evidence is real but dies with the session, so it can't anchor
anything for a later reader. Registering the identifier can.

Adds it as an anti-pattern, with the concrete routing (a cross-model tool
goes in `tool-mappings.yml`; anything else cites where it was confirmed).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JCwW1H9AFVc8J1eRcobG32
Copilot AI review requested due to automatic review settings July 25, 2026 19:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@claude

This comment has been minimized.

Comment thread skills/ums/SKILL.md
The insertion landed between the `memories/repo/<repo>.md` bullet's opening
line and its eight-line continuation, so Markdown re-parented that
continuation onto the new bullet. The repo-lore guidance is the remediation
for the retired `memories/repo/` pattern and has nothing to do with
identifier anchoring.

This is precisely the pitfall the *next* bullet in the same list describes,
added after review caught the same mistake on ai-config#335. Its stated
remedy -- read the lines around the insertion point, or place the bullet
after the complete enclosing item -- is what should have run here. Reading
only a fixed window below the target's first line is what missed it: the
continuation sat past the end of that window.

The diff against main is now purely additive (11 insertions, 0 deletions),
which is the mechanical check that no existing bullet was disturbed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JCwW1H9AFVc8J1eRcobG32
Copilot AI review requested due to automatic review settings July 25, 2026 19:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@claude

claude Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Claude finished @d-morrison's task in 3m 21s —— View job


Verdict: Ready for merge

  • Read prior review context
  • Read current state of skills/ums/SKILL.md
  • Verify the re-parenting fix from 0507d1a
  • Check for any new issues
  • Post verdict

Confirming review

The prior verdict was Changes Requested (round 1 review, job run 30170991571) for one structural bug: the new bullet was inserted between the opening line and the multi-paragraph continuation of the Creating memories/repo/<repo>.md anti-pattern, re-parenting that continuation in Markdown.

Commit 0507d1a ("Move the new bullet past the preceding one's full extent") fixes this correctly. The new bullet now occupies skills/ums/SKILL.md:296-306, sitting after the full eight-line continuation of the preceding bullet (lines 287-295), and before the Inserting a new bullet anti-pattern (line 307). The nesting is clean.

No new findings:

  • References: tool-mappings.yml exists; LIST_COMMITS/mcp__github__list_commits is registered at tool-mappings.yml:199-204; ai-config#727 is real (commit 7861157 in git log).
  • ASCII punctuation: No banned Unicode in the new lines. The --- used for the spaced dash is ASCII-compliant; "you're" uses U+0027 (plain apostrophe, confirmed by hexdump); the only non-ASCII bytes are the emoji, consistent with every other anti-pattern bullet in the file.
  • Prose: The rule is clear, specific, and actionable; the "evidence dies with the session" framing captures the real failure mode accurately; the worked example is grounded in a real event.

The prior finding is resolved. No new issues. Ready for merge.

@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.

2026-07-25 20:40 UTC

@d-morrison
d-morrison merged commit 4c48656 into main Jul 25, 2026
10 checks passed
@d-morrison
d-morrison deleted the ums-anchor-lone-identifiers branch July 25, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants