Skip to content

fix(telemetry): a step end names its skill either way - #767

Merged
blafourcade merged 1 commit into
nextfrom
fix/a-step-end-names-its-skill-either-way
Sep 4, 2026
Merged

blafourcade merged 1 commit into
nextfrom
fix/a-step-end-names-its-skill-either-way

Conversation

@blafourcade

@blafourcade blafourcade commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

What

Both closers compared the two names with ===. skill-detection.cjs has two capture routes and they disagree:

Route Hosts Writes
skillNameFromArgument Claude Code, Copilot aidd-dev:01-plan
skillNameFromSkillFileRead Cursor, Codex 01-plan

The end is captured by neither — it is read out of the text a skill echoes, and a skill always names itself in full, because that is what it knows itself as. So on Cursor and Codex a step opened as 01-plan met an end named aidd-dev:01-plan, matched nothing, and ran on as if the skill had never said it was done.

aidd-dev:01-plan has carried this since step_end shipped; #763 and #764 both had to declare it as a standing limit. This removes it.

Change

One predicate, namesTheSameSkill, for the step axis and the flow axis: equal outright, or equal once a plugin: prefix comes off — and only when one side carries no plugin at all. Two qualified names that disagree stay two skills, so aidd-dev:01-plan and aidd-pm:01-plan are never folded together.

The cost is stated where the function lives: an unqualified 01-plan closes whichever 01-plan is open, whatever plugin it came from. The host threw the plugin away before this code saw the line, and no reader can put it back — the same limit ORCHESTRATING_SKILLS already names.

Guards

Guard Mutation that kills it
a bare opener is closed by a full-name end, in a step and in a flow compare with === again — 4 failures
two qualified names that disagree are never folded drop the both-qualified check — 3 failures
the prefix actually comes off at the colon return the name unchanged — 2 failures

Not proven by the sink

This machine's journals were written by Claude Code, which spells the name in full on both sides, so the corpus cannot separate the two rules. The guards are the proof; the hosts this fixes are Cursor and Codex.

What this does not change

by_step keys its rows on the spelling the step_start wrote, and --step <name> matches that same stored value exactly. Both are unchanged: this PR moves only where an interval ends, never how the row it produces is named. Two openers of one skill spelled differently in the same period therefore still read as two rows - the standing limit already stated on ORCHESTRATING_SKILLS, not one this introduces. Verified: no other site in cli/src/domain or cli/src/application compares two skill names, so the two closers are the only comparisons and both now go through namesTheSameSkill.

Gates: 3434 tests / 308 files, tsc, biome ci, knip, jscpd, bundle within budget, 369 repository script tests, 0 broken links, cli layering clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp

Both closers compared the two names with `===`. skill-detection.cjs has two
capture routes: Claude Code and Copilot write `aidd-dev:01-plan`, Cursor and
Codex write the bare directory name `01-plan`. The end is captured by neither
- it is read out of the text a skill echoes, and a skill always names itself
in full. So on Cursor and Codex a step opened as `01-plan` met an end named
`aidd-dev:01-plan`, matched nothing, and ran on as if the skill had never
said it was done.

One predicate now answers it for the step axis and the flow axis: equal
outright, or equal once a `plugin:` prefix comes off, and only when one side
carries no plugin at all. Two qualified names that disagree stay two skills.

The cost is stated where the function lives: an unqualified `01-plan` closes
whichever `01-plan` is open, whatever plugin it came from. The host threw the
plugin away before this code saw the line.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
@blafourcade
blafourcade force-pushed the fix/a-step-end-names-its-skill-either-way branch from 18e31bb to 00184b0 Compare September 4, 2026 22:06
@blafourcade
blafourcade merged commit 534d3db into next Sep 4, 2026
17 checks passed
@blafourcade
blafourcade deleted the fix/a-step-end-names-its-skill-either-way branch September 6, 2026 06:22
@aidd-bot aidd-bot Bot mentioned this pull request Sep 9, 2026
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.

1 participant