Repository navigation
Description
Problem
/assess hardcodes npx sequant run … in every Commands block, the Chain: line, and all SKILL.md examples (.claude/skills/assess/SKILL.md:236, :244, :337-340, etc.). But npx sequant is the invocation most prone to version skew: with a dual node prefix (npx resolving from one prefix, the global binary from another) plus npx cache reuse, npx sequant can silently run a stale version while a directly-installed sequant on PATH is current. The user then copy-pastes an assess-generated command that may execute an outdated binary.
This is mitigated but not fixed today by src/commands/run.ts:32 (checkVersionCached → getVersionWarning), which warns about staleness — but only after the stale version has already launched. The emitted command string is the actual lever, and assess controls it.
Related prior art: #539 (stray $HOME/node_modules/sequant warning), #534/version-check home-stray footgun. None of those change what assess emits.
Proposed approach
Make assess choose the command prefix to match the user's environment, probed once in Step 1 (assess already shells out — it runs npx sequant locks check-batch):
- If
command -v sequantresolves a global/PATH install → emitsequant run … - Otherwise → keep
npx sequant run …(the zero-install path must remain the default for users without a global install)
Acceptance Criteria
- AC-1 — assess probes once for a resolvable
sequanton PATH and selects the command prefix accordingly (global →sequant run, elsenpx sequant run). - AC-2 —
npx sequant runremains the fallback when no global install is found; zero behavior change for npx-only users. - AC-3 — The Commands block, the
Chain:line, and the worked examples all use the same chosen prefix consistently within a single assessment. - AC-4 — Change applied across all three skill-mirror roots (
.claude/skills/,templates/skills/,skills/) and passescheck-skill-sync.ts.
Notes / open questions
- Scope is assess's emitted commands only — no runtime behavior change.
- Worth weighing against simply trusting
run's existing outdated-warning: the failure mode is "stale version runs, then warns," not silent corruption. Reasonable to close as wontfix if the warning is deemed sufficient — flagging this so a human triages the cost/benefit rather than assuming the feature is wanted. - assess's own
npx sequant locks check-batchinvocation has the same skew exposure, but that's a separate concern from the emitted run commands. - This is skill-prose / LLM-driven emission, not a code path — the fix lives in the SKILL.md instruction + 3-dir sync, so it pairs naturally with the reconciliation in chore: reconcile skill-mirror divergences (8 diverged, 10 missing across the 3 roots) #738.
Activity
admarble commentedon Jun 22, 2026
Complexity: Standard (4 ACs, 1 logical file × 3 skill-mirror roots)
AC Quality Check
ACs are well-formed and measurable. One note: the
ac-parserdid not extract these because the issue uses**AC-1** —(em-dash, no colon); the parser expects**AC-1:**. Cosmetic only — analyzed inline. AC-1/AC-3 are clearly testable; AC-2 ("zero behavior change for npx-only users") is a negative assertion best verified by inspection + a dry-run in an npx-only env.Scope Assessment
Non-Goals (from issue): assess's emitted commands only — no runtime behavior change; assess's own
npx sequant locks check-batchinvocation is explicitly out of scope.Verdict: ✅ SCOPE_OK — single skill-prose change, mechanically mirrored.
Acceptance Criteria
AC-1 — Probe once for resolvable
sequant, select prefix accordinglyVerification: Integration Test (skill-prose behavior; verify via dry-run assessment in both environments)
Scenario: Given a global
sequanton PATH → When /assess runs Step 1 → Then it emitssequant run …(notnpx sequant run …).Assumptions:
command -v sequant >/dev/null 2>&1is a sufficient probe; ifsequantresolves on PATH it is the current/global install (per the dual-prefix skew note —npx sequantis the stale one).AC-2 —
npx sequant runremains the fallback (zero change for npx-only)Verification: Manual Test
Scenario: Given no
sequanton PATH → When /assess runs → Then output is byte-identical to today'snpx sequant run ….AC-3 — Commands block,
Chain:line, and worked examples use the same chosen prefix within one assessmentVerification: Manual Test (inspect a single generated assessment for prefix consistency)
Scenario: Given the chosen prefix is
sequant run→ When the dashboard renders → Then Commands block +Chain:line all usesequant run, none usenpx sequant run.AC-4 — Applied across all 3 mirror roots; passes
check-skill-sync.tsVerification: Integration Test
Scenario: Given edits to
.claude/skills/assess/SKILL.md→ Whennpx tsx scripts/check-skill-sync.tsruns → Then exit 0 (.claude/skills/,templates/skills/,skills/identical).Implementation Plan
Phase 1: Define the probe + prefix selection (source of truth:
.claude/skills/assess/SKILL.md)locks check-batchshell-out), add a one-line probe and aCMD_PREFIXdefinition:command -v sequant >/dev/null 2>&1 && CMD_PREFIX="sequant run" || CMD_PREFIX="npx sequant run"with prose: "Resolve
CMD_PREFIXonce here; reuse it for every emitted run command below."CMD_PREFIXfor every command in the Commands block and theChain:line. Never mix prefixes within one assessment (AC-3)."Chain:annotation format (lines 185, 244, 306) and the Commands block template (lines 236-237) to reference<CMD_PREFIX> run/ the chosen prefix rather than hardcodednpx sequant run.Phase 2: Worked examples
npx sequant run …but add a one-line note under the first example block: "Examples show thenpx sequantdefault; with a global install the prefix issequant run(see Step 1)." This keeps few-shot readability while making the runtime rule authoritative (see Open Question 1).Phase 3: Mirror + verify
.claude/skills/, thennpx tsx scripts/check-skill-sync.ts --fix, or edit each).npx tsx scripts/check-skill-sync.ts→ expect exit 0 (AC-4).Rule Touchpoints
The behavior-rule detector does not trigger on these ACs (no ≥2 keywords from default/always/never/rule/behavior/skip), and the issue confirms this is skill-prose / LLM-driven emission, not a code path. The only touchpoint is
assess/SKILL.md×3 mirrors — there is no runtime TypeScript duplicating this rule, so the usual "edit lands at one site, the other goes stale" risk does not apply here. ✅Design Review
locks check-batch) — the cheapest place to probe once.command -v sequantprobe setting oneCMD_PREFIXtoken, threaded by one new Commands-Block rule. No new files, no runtime code.check-skill-sync.ts).command -v sequantenough, or could it resolve a local node_modules shim?" —command -vchecks PATH, not local installs; npx-only users have no PATH entry, so it's correct. (b) "Why not just trustrun's existing outdated-warning?" — see issue's own wontfix note; flagged for human triage (Open Question 2).Open Questions
npx sequant run, the default) + one clarifying note, rather than replacing all literals with a<CMD_PREFIX>placeholder. Impact if wrong: placeholder tokens reduce few-shot readability; the note approach keeps examples copy-pasteable for the common npx case.test,fullsolve,qa,loop,merger,improve,execSKILL.md files also emitnpx sequant run. Most are internal chain instructions, not user copy-paste dashboards, so the skew exposure is lower. Recommendation: do not widen this issue — file a follow-up if the global-prefix convention proves valuable. assess's ownlocks check-batchinvocation (same skew) is already noted out-of-scope by the issue.Recommended Workflow
Phases: exec → qa
Quality Loop: disabled
Reasoning: Small, localized skill-prose change with one mechanically-verifiable AC (
check-skill-sync.ts). No runtime code path → notestgen; no UI → notest; not security-sensitive./specis complete (this comment). A post-execcheck-skill-sync.tsrun + a dry-run /assess in an npx-only env covers AC-1–AC-4.Label Review
Current: enhancement, cli
Recommended: enhancement, cli (+ consider
docsorskillif such a label exists, since the change is skill-prose)Reason: Labels are accurate. Quality Loop will not auto-enable (SCOPE_OK, single file).
docs(#740): make Rule #9 prefix-substitution enumeration exhaustive
feat(#740): feat(assess): emit `sequant run` when a global install is…