Skip to content

fix(#1345): Claude Code ≥2.1.286 tells Claude to run any project skill named verify before every commit — Sequant's verify expects an issue number and posts to GitHub - #1347

Merged
admarble merged 6 commits into
mainfrom
feature/1345-fix-skills-claude-code-2-1-286-tells-claude-to-run
Oct 6, 2026
Merged

admarble merged 6 commits into
mainfrom
feature/1345-fix-skills-claude-code-2-1-286-tells-claude-to-run

Conversation

@admarble

@admarble admarble commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Claude Code ≥ 2.1.286 tells Claude to run any project skill named verify right before committing. Sequant copies its verify skill into every project, and that skill expects an issue number and posts to GitHub. This PR keeps the name and makes pre-commit invocations a no-op.

  • /verify returns a one-line no-op, doing nothing else, in three cases:

    1. A Sequant phase other than verify called it. The skill runs printenv SEQUANT_PHASE, which is pre-approved in allowed-tools and set by phase-executor.ts for every phase. Any value other than verify means the commit guidance triggered it, so the no-op holds even with an issue number. This covers the /verify <N> gap from the first pass.
    2. No issue number was given.
    3. Claude called it on its own before a commit, and nobody asked for /verify in the conversation. This relies on the model's own account of why it is invoking the skill, so it is measured, not tested.

    A /verify <N> a user asks for, and the verify phase (SEQUANT_PHASE=verify), run as before. The guard is mirrored to .claude/skills, templates/skills and plugin/skills.

  • /upstream gets a name-collision category. Changelog lines that name a shipped skill in backticks or after "named" are high impact, always issue-worthy, and get their own row in the report. They no longer reuse the "breaking" label.

  • The shipped skill list no longer switches off silently. It resolves from the bundled templates (getTemplatesDir()), not the cwd. The default baseline fills it too, and an empty list logs a warning.

  • ADR-0009 records the design, status Proposed until the owner accepts it.

Refs #1345. Not Fixes: AC-1 and AC-2 are not met as written, so merging should not close the issue. It stays open for the AC rewrite and the interactive measurement. Switch to Fixes if you would rather close it and file a follow-up.

AC status (runner-verified)

AC Status Evidence
AC-1 reproduction before the fix Partial This PR's own exec phase (claude -p, Claude Code ≥ 2.1.286, unguarded skill) had "run /verify right before the commit command" in its context, made 2 non-docs commits, and called 0 /verify and 0 gh issue comment. n = 1 run. Interactive sessions are not measured.
AC-2 reproduction after the fix Not measurable as written The before count is already 0. The AC-2 mutation record below covers case 1 only (a phase agent other than verify gets the no-op, even with an issue number). It does not satisfy AC-2's text. Case 3 needs an interactive-session measurement, and the AC rewrite is the owner's (see #1345).
AC-3 sync delivers the guard Met src/lib/verify-skill-guard.integration.test.ts
AC-4 references consistent Met Name unchanged; lint:skill-sync (48 synced) and lint:skill-calls (no violations) pass
AC-5 classifier rule Met src/lib/upstream/__tests__/relevance.test.ts

Tests: full suite, 375 files, 9,044 passed, 1 expected fail, 3 skipped (run locally on the code in 42e2ef48; later commits are docs, a dead ?? 0 removal and formatting, re-checked with tsc and the upstream and guard tests). tsc --noEmit clean.

Mutation-verified: AC-3 — deleted the whole "Pre-commit invocations" guard section from templates/skills/verify/SKILL.md (re-run on the final guard text); src/lib/verify-skill-guard.integration.test.ts failed (the AC-3 case, plus the phase-check case that reads the same section); restored.

Mutation-verified: AC-2 (case 1 only) — removed the Bash(printenv SEQUANT_PHASE) allowed-tools entry from templates/skills/verify/SKILL.md; src/lib/verify-skill-guard.integration.test.ts failed (exactly the phase-check case); restored.

Mutation-verified: AC-5 — made analyzeChange fall back to categorizeChange instead of name-collision; src/lib/upstream/tests/relevance.test.ts failed; restored.

Mutation-verified: AC-5 — deleted the empty-list warning in listShippedSkillNames; src/lib/upstream/tests/relevance.test.ts failed; restored.

Still open (owner)

🤖 Generated with Claude Code

Entire-Checkpoint: 1075e1581562
…og lines naming a shipped skill

Entire-Checkpoint: bde029a0db11
…it calls; /upstream gets a name-collision category

Phase agents other than verify are detected through SEQUANT_PHASE (pre-approved printenv), so /verify <N> from an exec agent no longer runs. The shipped skill list resolves from the bundled templates and warns when empty. Name collisions get their own category instead of reusing breaking. ADR-0009 back to Proposed.

Claude-Session: https://claude.ai/code/session_01XUpiitdgsZzRtkZh6VNJeZ
Entire-Checkpoint: 2513d4ccab29
…y field

Assessments are built in memory and never read back from disk, so the field is always present.

Claude-Session: https://claude.ai/code/session_01XUpiitdgsZzRtkZh6VNJeZ
Entire-Checkpoint: 00a97e0d58e7
@admarble
admarble merged commit f19b806 into main Oct 6, 2026
11 checks passed
@admarble
admarble deleted the feature/1345-fix-skills-claude-code-2-1-286-tells-claude-to-run branch October 6, 2026 23:51
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