Repository navigation
Description
Epic: graph-2026-10-freeze-c Tier: mechanical Execution: sequant_run
- Blocked by: feat(update): respect the manifest's install scope — update on a skills-only install installs hooks, agents and settings.json #1482
- Blocked by: fix(run): uncommitted hook changes go unwarned — phases run the committed .claude/hooks/, but the #1354 check only covers skills #1456
Owner ruling (2026-10-17, plan OQ-1): a plain sync keeps a skills-only scope. Widening to a full install is deliberate, through sequant init.
Follow-up from #1409 (PR #1467). #1409's spec raised these as OQ-1 and OQ-2, and its QA marked both unresolved. #1482 is the sibling node for update.
Problem
#1409 records the install scope (groups: ["skills"]), and scopedRemedy (src/commands/sync.ts:107) gives a partial install a fix that rewrites skills only. Plain sync never reads the scope for what it writes, and two of the commands that print a fix message ignore it too. They steer a skills-only install into a full install, which writes the hooks, agents and .claude/settings.json the install skipped. A --force sync also overwrites the repo's constitution (#814).
Observed on main @ 0857484 (dev CLI, temp repo, init --manifest-only + sync --only skills):
- Plain
syncat a matching version (sync.ts:537-583):- The report-only fast path diffs the whole template set. Only
--only skillsnarrows it (filterToSkillsOnly,:539), and the manifest scope is never read. - On an untouched skills-only install it printed
! Version current, but 12 file(s) differ — run \update` or `sync --force`` and exited 1. - The 12 files are the skipped groups, the same drift fix(sync): a --only skills install warns 'N file(s) differ' forever, and the suggested sync --force overwrites the repo's constitution #1409 removed from the pre-flight.
- The report-only fast path diffs the whole template set. Only
doctor's Skills Version check (doctor.ts:649):- With
.sequant-versionset to0.0.1, it printed! Skills Version: Outdated (0.0.1 → 2.19.0) - run: sequant sync. - The pre-flight banner of the same
doctorrun printedRun: sequant sync --only skills, so the two lines contradict each other.
- With
- Plain
syncat a version mismatch (sync.ts:460,:754,:827):skillsOnlycomes from--onlyalone (const skillsOnly = only === "skills"), so the manifest scope never narrows what a plain sync writes.- It takes the apply path, installs hooks, agents and
.claude/settings.json, and records a full install. The fix(sync): a --only skills install warns 'N file(s) differ' forever, and the suggested sync --force overwrites the repo's constitution #1409 testAC-4: a full sync on a skills-only install records a full installpins that behaviour. - With feat(update): respect the manifest's install scope — update on a skills-only install installs hooks, agents and settings.json #1482,
updaterefuses on a partial scope, so a plainsyncis the one command left that widens a skills-only install without asking.
- Old-style manifests (no
groupsfield, from before fix(sync): a --only skills install warns 'N file(s) differ' forever, and the suggested sync --force overwrites the repo's constitution #1409) read as a full install by design (ADR-0015).- On a repo with only
.claude/skills/and.claude/memory/,doctorprintedVersion current, but 12 file(s) differ … Run: sequant sync --force (or sequant update). - It gave no hint that the repo is skills-only.
- The owner ruled that scope is never inferred (inference can't tell "skipped" from "deleted"). The recovery is the hand edit
"groups": ["skills"], and nothing tells the user about it.
- On a repo with only
Acceptance Criteria
- AC-1: On a manifest with
groups: ["skills"]at a matching version, plainsync(no--only) counts drift only inside the install scope. With.claude/skills/matching the bundle it reports up to date and exits 0. With one skill file edited it reports exactly that one file, namessync --only skills --force, and exits 1. Evidence:npx vitest run src/commands/sync.install-scope.integration.test.ts -t "plain sync on a skills-only install"reports ≥ 1 passed and 0 failed (a filter that matches nothing reports all skipped and exits 0), mutation-verified by restoring the unscoped change set in the report-only fast path. - AC-2: On a manifest with
groups: ["skills"]and outdated skills,doctor's Skills Version check namessync --only skills(thescopedRemedytext), never a baresync. A full install keeps its current message. Evidence:npx vitest run src/commands/doctor.test.ts -t "scoped install remedy"reports ≥ 1 passed and 0 failed (a filter that matches nothing reports all skipped and exits 0), mutation-verified by restoring the baresyncremedy in the Skills Version check. - AC-3: On a manifest without
groups, when.claude/hooks/,.claude/settings.jsonand.claude/agents/are all absent,doctoradds one advisory line. It says the install reads as full and names the edit"groups": ["skills"]in.sequant-manifest.json. The line is never printed when any of the three exists, or whengroupsis present.getInstallScopeis unchanged. Evidence:npx vitest run src/commands/doctor.test.ts -t "legacy skills-only manifest"reports ≥ 1 passed and 0 failed (a filter that matches nothing reports all skipped and exits 0), mutation-verified by deleting the advisory check. - AC-4: No fix message printed for a partial install names
update,sync --forcewithout--only skills, or a baresync. A test checks every per-install producer throughscopedRemedy:checkAndWarnSkillsOutdated(sync.ts:939,:954),getSkillsInstallStatus(version-preflight.ts:146), the plain-sync fast path anddoctor. Evidence:npx vitest run src/commands/sync.install-scope.integration.test.ts -t "no remedy widens a partial install"reports ≥ 1 passed and 0 failed (a filter that matches nothing reports all skipped and exits 0), mutation-verified by replacingscopedRemedy's partial branch with the full-install text. - AC-5: On a manifest with
groups: ["skills"]and.claude/skills/.sequant-versionolder than the package, a plainsync(no--only) writes only under.claude/skills/:.claude/hooks/,.claude/agents/and.claude/settings.jsonstay absent, and the manifest keepsgroups: ["skills"].sync --dry-runpreviews the same scoped set. A manifest withoutgroupsstill gets a full sync. The fix(sync): a --only skills install warns 'N file(s) differ' forever, and the suggested sync --force overwrites the repo's constitution #1409 testAC-4: a full sync on a skills-only install records a full installis rewritten to this outcome. Evidence:npx vitest run src/commands/sync.install-scope.integration.test.ts -t "plain sync keeps a skills-only scope"reports ≥ 1 passed and 0 failed (a filter that matches nothing reports all skipped and exits 0), mutation-verified by derivingskillsOnlyfrom--onlyalone again. - AC-6: ADR-0015 says a plain
synckeeps a partial scope and thatsequant initis the way to widen it to a full install. Evidence:sed -n '/^## Decision/,/^## Options/p' docs/adr/0015-install-scope-recorded-in-manifest.md | grep -c "sequant init"prints ≥ 1 (0 today).
Prior fixes / producers
-
Prior fixes on the fix-message text:
- fix(update/sync): sync reports 'up to date' on content drift; update overwrites in-place customizations (constitution) #708 (PR fix(#708): content-truth for update/sync; protect in-place customizations #710: content truth,
sync --forcetext) - fix(sync): areSkillsOutdated/checkAndWarnSkillsOutdated pre-flight is version-only — misses content drift (sibling of #708) #713 (PR fix(#713): make pre-flight skill check content-aware, not version-only #717: content-aware pre-flight,
sync --force (or update)) - fix(sync): plain sync overwrites CUSTOMIZABLE_FILES (constitution) — copyDir ignores force and never consults isCustomizableFile #814 (PR fix(#814): plain sync preserves CUSTOMIZABLE_FILES (constitution) #815: plain sync preserves the constitution)
- fix: recommend the CLI invocation that reaches the running build #898 (
resolveCliInvocationindoctor) - fix(cli): preAction auto-sync fires on
serve— the plugin's @latest MCP server silently rewrites .claude/hooks, skills, AGENTS.md in every project it starts in (#793 pin never ships via marketplace source "./") #988 (PR fix(cli): skills pre-flight is warn-only; serve is side-effect-free; shipped .mcp.json pinned (#988) #989: report-only pre-flight) - fix(sync): never rewrite a user-owned AGENTS.md or write a machine-specific scripts/dev symlink (absorbs #991) #990 (PR fix(sync): never rewrite a user-owned AGENTS.md or write a machine-specific scripts/dev symlink (#990) #1036)
- fix(sync): a --only skills install warns 'N file(s) differ' forever, and the suggested sync --force overwrites the repo's constitution #1409 (PR fix(#1409): record the install scope so a skills-only install stops drifting #1467:
scopedRemedy)
That is seven fixes in one class.
- fix(update/sync): sync reports 'up to date' on content drift; update overwrites in-place customizations (constitution) #708 (PR fix(#708): content-truth for update/sync; protect in-place customizations #710: content truth,
-
Producers of a skills fix message (non-test
src/, grepsync --force|or update|scopedRemedy|cli\} (sync|update)):sync.ts:580(fast path, unscoped)sync.ts:939and:954(checkAndWarnSkillsOutdated, scoped)version-preflight.ts:146(getSkillsInstallStatus, scoped)doctor.ts:649(unscoped)mcp/server.ts:46(staticsequant://installresource description: "runsequant update"). It isn't per-install and AC-4 doesn't assert it; it's a text-only change listed in May touch, so it stops namingupdate.
The ACs state the outcome for every per-install producer (AC-4), so the fix routes them all through
scopedRemedy. It must not add a second scope check. -
What a plain sync writes: one decision,
skillsOnlyatsync.ts:460, feeds the fast path (:539), the preview (:607), the apply filter (:754), the MCP pin (:517), the opencode shim (:551,:876), AGENTS.md (:624,:833) and the manifest write (:827). AC-5 states the outcome, so the fix resolves the effective scope once there (--only, else the manifest's partial scope); it doesn't patch each consumer. The same change makes AC-1's fast path scoped. -
Not fix messages for skills:
sync.ts:446,:689,:815and:866(sync --forceto replace a preserved user-owned file, full-install paths only);doctor.ts:684(missing AGENTS.md →init --force; see Non-Goals).
May touch
src/commands/sync.ts (the effective scope at :460, the report-only fast path, scopedRemedy), src/commands/doctor.ts (Skills Version check, new advisory line), src/mcp/server.ts:46 (text only), src/commands/doctor.test.ts, src/commands/sync.install-scope.integration.test.ts, src/commands/sync.test.ts, docs/adr/0015-install-scope-recorded-in-manifest.md (the plain-sync sentences), CHANGELOG.md (including the unreleased #1409 entry's "a full sync … removes it").
Non-Goals
- Inferring the install scope from disk in
getInstallScopeor migrating a manifest automatically. The owner ruled hand edit plusdoctoradvice; inference hides real drift. update's behaviour on a partial scope (feat(update): respect the manifest's install scope — update on a skills-only install installs hooks, agents and settings.json #1482, option B).- A manifest with
groups: [](init --manifest-only, nothing installed yet). A plainsyncthere still installs every group and records a full install. - A flag to widen from
sync(for examplesync --full).sequant initalready widens (measured: a fullinit --yeson a scoped repo installs hooks, agents andsettings.jsonand dropsgroups). doctor's missing-AGENTS.md check on a skills-only install (doctor.ts:684, which suggestsinit --force).doctorreporting content drift at a matching version. Its Skills Version check reads onlyoutdatedtoday.- ADR-0015's
updatesentences (feat(update): respect the manifest's install scope — update on a skills-only install installs hooks, agents and settings.json #1482 owns them). - Any edit under
plugin/,.claude/skills/ortemplates/skills/(plugin freeze).
Activity
admarble commentedon Oct 18, 2026
Runner context (graph-2026-10-freeze-c, wave 2). Both blockers are merged. Repo state on main 96990da:
src/commands/update.tsrefuses ongetInstallScope(manifest).kind === "partial"(src/lib/manifest.ts:74). ADR-0015'supdatesentences now belong to feat(update): respect the manifest's install scope — update on a skills-only install installs hooks, agents and settings.json #1482. Leave them as they are (Non-Goal).sed -n '/^## Decision/,/^## Options/p' docs/adr/0015-install-scope-recorded-in-manifest.md | grep -c "sequant init"prints0. It must read ≥ 1 only after this change.src/commands/unmanaged-skill-safety.integration.test.tsmocks../lib/manifest.js. Whensyncstarts callinggetInstallScope, that mock already supplies it (added in feat(#1482): respect the manifest's install scope — update on a skills-only install installs hooks, agents and settings.json #1494). Any other test that mocksmanifest.jswithout it fails in CI withgetInstallScope is not a function. Before pushing, grepvi.mock(".*manifestacrosssrc/.plugin/,.claude/skills/ortemplates/skills/.admarble commentedon Oct 18, 2026
Complexity: Standard (6 ACs, 5 directories)
AC Quality Check
All six ACs are single-line, carry
Evidence:with a-tfilter, and name a mutation. Notes:grep -c "sequant init"prints 0 today, so it fails before the change (good).Scope Assessment
Non-Goals: present in the issue body (no inference in
getInstallScope,update,groups: [], no widen flag,doctor.ts:684, plugin/skills dirs).src/commands,src/mcp,src/lib-read-only,docs/adr, root)Verdict: ✅ SCOPE_OK
Acceptance Criteria
AC-1: plain
syncfast path counts drift inside the install scopeVerification: Integration Test
Scenario: Given
groups:["skills"], matching version → Whensync→ Then up to date/exit 0; with one skill edited, exactly 1 file, namessync --only skills --force, exit 1.Assumptions: fast path at
sync.ts:537-583can reusefilterToInstallScope.AC-2:
doctorSkills Version remedy is scopedVerification: Unit Test (
doctor.test.ts, "scoped install remedy")Scenario: Given partial manifest and outdated skills → When
doctor→ Then message namessync --only skills; full install unchanged.AC-3: legacy skills-only advisory
Verification: Unit Test ("legacy skills-only manifest")
Scenario: Given manifest without
groups, and hooks/, settings.json, agents/ all absent → advisory naming"groups": ["skills"]; absent when any exists orgroupspresent.AC-4: no partial-install remedy widens
Verification: Integration Test ("no remedy widens a partial install")
Scenario: Given a partial scope → each producer (
checkAndWarnSkillsOutdated×2,getSkillsInstallStatus, fast path,doctor) output contains none ofupdate,sync --forcewithout--only skills, baresync.AC-5: plain
synckeeps a skills-only scopeVerification: Integration Test ("plain sync keeps a skills-only scope")
Scenario: Given
groups:["skills"], older.sequant-version→syncwrites only under.claude/skills/; manifest keepsgroups;--dry-runpreviews the same set; nogroups→ full sync. Rewrite #1409's "AC-4: a full sync on a skills-only install records a full install".AC-6: ADR-0015 Decision names
sequant initVerification: Manual/command (
sed … | grep -c "sequant init"≥ 1)Implementation Plan
Phase 1: Single effective scope in sync (AC-1, AC-5)
sync.ts:460: deriveskillsOnly = only === "skills" || scope is partialonce, after the manifest is read. Partial meanskind==="partial"andgroupsnon-empty (groups: []stays full, per Non-Goals). SkipskillsOnlyside effects only for manifest-derived case as needed: the manifest write at:827must keepgroups(useaddGroup:"skills", which is a no-op on an existing skills scope).skillsOnly(:517,:539,:551,:607,:624-635,:754,:827,:833,:876,:887) behaves correctly with the derived value. Fast-path scoping (AC-1) then falls out. Check the remedy at:578goes throughscopedRemedy.skillsgroup (e.g.["hooks"]if possible) —filterToInstallScopereturns[]; confirm that does not make plain sync a silent no-op trap; fall back to full only forgroups: [].Phase 2: Route messages through
scopedRemedy(AC-2, AC-3, AC-4)doctor.ts:649: readgetInstallScope(manifest)(manifest is already read at:595), usescopedRemedy(scope, cli, true) ?? \${cli} sync`. NeedsscopedRemedyimported from./sync.js`.doctor.ts: add the legacy advisory (nogroups, hooks/settings.json/agents absent). UsefileExists. Do not changegetInstallScope.mcp/server.ts:46: rewordsequant update(text only; check any test pinning that string).sync.ts:578usesscopedRemedy, not a local ternary.Phase 3: Tests, ADR, changelog
sync.install-scope.integration.test.tsanddoctor.test.ts; rewrite fix(sync): a --only skills install warns 'N file(s) differ' forever, and the suggested sync --force overwrites the repo's constitution #1409's AC-4 test.doctor.test.tsmocks../lib/manifest.jswithoutgetInstallScopeand./sync.jswithoutscopedRemedy(:36,:49). Add both. Also checkrun.test.ts,run-preflight-exit.test.ts,init.test.tsmocks ofmanifest.js(grepvi.mock(".*manifestbefore pushing).sequant initto widen. Leave theupdatesentences. CHANGELOG: fix the unreleased fix(sync): a --only skills install warns 'N file(s) differ' forever, and the suggested sync --force overwrites the repo's constitution #1409 "a full sync … removes it" line.Mutation-verified: AC-N — …markers with the FILE path before the first>in the PR body.Design Review
syncCommand; message text inscopedRemedy;getInstallScopestays the only reader of the manifest field.skillsOnly, and all producers callscopedRemedy. Rejected: patching each consumer, and a--fullflag (Non-Goal).serve— the plugin's @latest MCP server silently rewrites .claude/hooks, skills, AGENTS.md in every project it starts in (#793 pin never ships via marketplace source "./") #988, fix(sync): never rewrite a user-owned AGENTS.md or write a machine-specific scripts/dev symlink (absorbs #991) #990, fix(sync): a --only skills install warns 'N file(s) differ' forever, and the suggested sync --force overwrites the repo's constitution #1409) — the issue already treats this as a class. The plan fixes the class by routing every per-install producer throughscopedRemedyand asserting all of them in one AC-4 test, rather than one more local patch. Recorded as class fix, notdeliberately local.sync.tsfast path,checkAndWarnSkillsOutdated(×2),version-preflight.ts:146,doctor.ts:649,mcp/server.ts:46(static). Consumers ofskillsOnly: the ten sites listed in step 2. Only one resolver after this change.Feature Quality Planning
All standard checks pass. Notable items:
sync.ts(runtime) and ADR-0015; no skill-prompt touchpoint, and the plugin freeze forbids touching skills dirs anyway.groups:["skills"]manifest now can't widen viasync; the message must point tosequant init. Include that in the sync output when the scope is kept (small, no new AC).Open Questions
sequant init)". Impact: discoverability only; no AC depends on it.skills— Recommendation: treat as skills-only write set is wrong; make plain sync a reported no-op. Impact: edge case; no current command writes such a manifest.Recommended Workflow
Phases: exec → qa
Quality Loop: disabled
Reasoning: CLI/text change with Integration/Unit Test ACs declared via
Evidence:; tests are named in the ACs so testgen is skipped. No UI. Bug label, 1 feature.Label Review
Current: bug, graph-2026-10-freeze-c
Recommended: + planned
Reason: plan posted
Quality Loop: Won't auto-enable (SCOPE_OK).
admarble commentedon Oct 18, 2026
QA Verdict: AC_NOT_MET
AC coverage: 5/6 met
Gaps:
test(#1485): AC-4 checks doctor's Skills Version remedy through the r…
admarble commentedon Oct 18, 2026
QA Review for Issue #1485
AC Coverage
-t "plain sync on a skills-only install"1 passed. Mutating sync.ts:552 back toallChangesfails exactly that test (re-run by QA). A smoke run on the dev CLI prints "already up to date" with exit 0.sync --only skillsformatSkillsOutdatedMessageroutes throughscopedRemedy. In the smoke run, doctor printedrun: sequant sync --only skills, the same command as its banner.getInstallScopeis unchanged. Removing the agents check fails "stays quiet when any of the three exists" (re-run by QA).checkAndWarnSkillsOutdated(viarunVersionPreflight),getSkillsInstallStatus, the fast path and doctor's formatter, all with the realscopedRemedy. A grep of every non-test producer shows each one either callsscopedRemedyor is a full-install fallback after??.--dry-run, and a legacy manifest that gets a full sync. The #1409 AC-4 test is rewritten. In the smoke run, only.claude/skillsexists andgroupsstays["skills"].sequant initCI Status
The required
testcheck is still running, so the verdict isNEEDS_VERIFICATION.Local verification
npm run build: passes.Code Review
Strengths:
skillsOnlyis decided once, from the effective scope, which is the single-decision fix the spec asked for. The apply path passesonly: "skills"through that one flag.groups: []still gets a full install (Non-Goal respected).Suggestions (non-blocking):
(--only skills: nothing outside .claude/skills/ …)even though--onlywas not passed. The "Install scope: skills only" banner already explains it, so this is only wording.groups: [], the fast-path remedy would namesync --only skills --force. This is very unlikely, because.sequant-versiondoes not exist afterinit --manifest-only.Mutation Verification
The PR body carries markers for AC-1 through AC-5, and every marker names a test file in the diff (Verified). QA re-ran the AC-1 and AC-3 mutations independently, and each one failed its target test.
Declared-Evidence Execution
All six AC evidence commands were executed by QA, each with ≥1 passed and 0 failed (AC-6 printed 1). Status: Complete.
CHANGELOG
[Unreleased]has a Fixed entry for #1485, and the #1409 entry'supdatewording is corrected. Status: met.Risk Assessment
syncand gets skills only. This is intended (owner ruling), and the gray banner namessequant init.sync.ts:955/971,:591,version-preflight.ts:146,doctor.ts:560) go throughscopedRemedy.sync.ts:446/705/831/882are preserved-file notes on full-install paths, which the issue excludes.mcp/server.tstext no longer namesupdate.Trust-Boundary Check
Status: Clean. The diff implements only the product requirements in the issue.
Adversarial Re-Read
The diff ran against the issue's motivating scenario (
init --manifest-only+sync --only skills, then plain sync at a matching version, plain sync at an outdated version, and doctor). Every result matched the ACs, and the doctor/banner contradiction is gone. The two mutations re-run above failed their target tests. No files were touched underplugin/or the skill directories (freeze respected). The only gaps are the two non-blocking wording/edge suggestions above. Status: Gaps Found (minor).Follow-up Ledger
N/A. Nothing was deferred.
Verdict: NEEDS_VERIFICATION
All six ACs are MET locally, but the required
testCI check is still in progress. Re-run QA once it reports. If it passes, the expected verdict isAC_MET_BUT_NOT_A_PLUSbecause of the minor wording suggestions.admarble commentedon Oct 18, 2026
QA Verdict: NEEDS_VERIFICATION
AC coverage: 6/6 met
fix(#1485): a plain sync that keeps the skills-only scope no longer s…
admarble commentedon Oct 18, 2026
Runner verification (graph-2026-10-freeze-c W2). I ran this after QA's NEEDS_VERIFICATION, in the worktree.
Fixes after the first QA (AC_NOT_MET 5/6):
f55b0a901: AC-4's test now checks doctor'sSkills Versionremedy through the realscopedRemedy, using the exportedformatSkillsOutdatedMessage. The mutation records for AC-4 and AC-5 are now in the PR body.19e19f545: a plainsyncthat keeps the scope no longer says "--only skills" was passed. QA had dropped this as cosmetic, but the line gave the wrong cause of the scoping. It now has a test, mutation-verified.Evidence commands, run verbatim on
f55b0a901:19e19f545)1(it printed 0 on main)The whole
sync.install-scope.integration.test.tsfile passes 16/16 on19e19f545.tsc --noEmitis clean. The freeze grep (plugin/ and the skill directories) printed nothing.Mutations, each failing its target test and then restored:
scopedRemedy's partial branch returns the full-install text.formatSkillsOutdatedMessagepassesundefinedas the scope. This is the only failure in the file.skillsOnlyis derived from--onlyalone.--only skillsagain.Follow-up ledger: QA wrote nothing to defer. The
groups: []remedy case from the first QA was dropped as a Non-Goal.PR #1498 waits on CI for
19e19f545and then on the owner's merge decision.