Repository navigation
Description
Epic: graph-2026-10-freeze-c Tier: mechanical Execution: sequant_run
Problem
A repo adopted with init --manifest-only + sync --only skills records groups: ["skills"] in .sequant-manifest.json (#1409, ADR-0015). Bare sequant update ignores that scope:
- It computes the whole template set (
src/commands/update.ts:213newFiles,:252applySet). - It writes every new file, including
.claude/hooks/, the agents and.claude/settings.json.
Since #1477, the manifest then records a full install. The record is now true, but the scope the user chose is widened without a prompt.
update is the documented upgrade command, and some remedy text still points scoped installs at it. So a skills-only adopter who upgrades the normal way gets hooks and a settings.json they opted out of.
Not the #1409 Non-Goal
#1409 excluded an update --only flag. This issue is about update reading the scope the manifest already records. It adds no new flag.
Decision (owner, 2026-10-16): option B
On a partial scope, update stops and names the scoped upgrade command, sync --only skills. It writes nothing.
sync --only skills already upgrades a scoped install. I checked on 2026-10-16 in a temp repo: with .claude/skills/.sequant-version set to 0.0.1 and a stale skill, it rewrote the skill, reset the marker, kept groups: ["skills"], and wrote nothing outside .claude/skills/. So update needs no second scope filter. It reads the scope through getInstallScope and refuses.
Rejected:
- A: filter
update's change set to the scope. That makes a second apply path for a partial install. - C: keep
updateas the "widen to full" command and only fix the remedy text. That leaves the documented upgrade command widening a scoped install without a prompt.
ADR-0015 must be amended. #1477 wrote "update installs every group, so it removes the field too". That stays true only for a full install. On a partial scope, update now refuses.
Acceptance Criteria
- AC-1: On a manifest with
groups: ["skills"],update(with--yes, and with--force) writes no file (the.mcp.jsonpin included), leaves the manifest byte-identical, sets a non-zero exit code, and prints the scoped upgrade commandsync --only skills. Evidence:npx vitest run src/commands/sync.install-scope.integration.test.ts -t "update refuses on a skills-only install"reports ≥ 1 passed, 0 failed, mutation-verified by deleting the partial-scope check insrc/commands/update.ts(exactly those tests fail). - AC-2: On a manifest with
groups: ["skills"],update --dry-runprints the same message, writes nothing and sets a non-zero exit code. Evidence:npx vitest run src/commands/sync.install-scope.integration.test.ts -t "update --dry-run refuses on a skills-only install"reports ≥ 1 passed, 0 failed. - AC-3: On a manifest without
groups(full install),updatebehaves exactly as today: it applies all new and modified files and writes nogroupsfield. Evidence:npx vitest run src/commands/update.test.ts src/commands/update.integration.test.tsreports 0 failed, andnpx vitest run src/commands/sync.install-scope.integration.test.ts -t "update on a full install"reports ≥ 1 passed. - AC-4: ADR-0015 and the Updating section of
docs/getting-started/installation.mdsay thatupdaterefuses on a partial scope and thatsync --only skillsupgrades a skills-only install. Evidence:sed -n '/^## Updating/,/^## Directory/p' docs/getting-started/installation.md | grep -c "sync --only skills"prints ≥ 1 (0 today), andgrep -c "installs every group, so it removes the field too" docs/adr/0015-install-scope-recorded-in-manifest.mdprints 0.
Prior fixes / producers
- Prior fixes on
update's manifest write: 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) addedgroups; fix(#1409): update records a full install in the manifest #1477 (2026-10-16) madeupdaterecord a full install. This issue replaces fix(#1409): update records a full install in the manifest #1477's behaviour on a partial scope. fix(#1409): update records a full install in the manifest #1477's testan update on a skills-only install records a full install(sync.install-scope.integration.test.ts) asserts the old behaviour and is rewritten to AC-1's. - Commands that write templates over a scoped install:
update(this issue),sync --only skills(keeps the scope), and plainsyncat a version mismatch (widens to full, recorded by fix(sync): a --only skills install warns 'N file(s) differ' forever, and the suggested sync --force overwrites the repo's constitution #1409's testa full sync on a skills-only install records a full install). Plainsyncis node A's (graph-2026-10-freeze-c). This issue is deliberately local toupdate: B is a refusal, not a second scope filter, and the scope is read throughgetInstallScope(src/lib/manifest.ts:74), the one reader.
May touch
src/commands/update.ts, src/lib/manifest.ts, src/commands/update.test.ts, src/commands/update.integration.test.ts, src/commands/sync.install-scope.integration.test.ts, docs/getting-started/installation.md, docs/adr/0015-install-scope-recorded-in-manifest.md, and CHANGELOG.
Non-Goals
- An
update --onlyflag (fix(sync): a --only skills install warns 'N file(s) differ' forever, and the suggested sync --force overwrites the repo's constitution #1409's Non-Goal) or any scope filter insideupdate(option A, rejected). - Plain
syncon a scoped install, and the remedy text other commands print (node A). - Inferring a scope for manifests without
groups(owner ruling 2026-10-16: hand-edit plusdoctoradvice, node A). - Any edit under
plugin/,.claude/skills/ortemplates/skills/(plugin freeze).
Activity
admarble commentedon Oct 17, 2026
Complexity: Standard (4 ACs, 4 directories)
AC Quality Check
All four ACs are single-line with an
Evidence:clause. AC-1/AC-2/AC-4 evidence fails on today's code (no refusal exists;grep -c "sync --only skills"in the Updating section is 0; the ADR phrase is still present), so none is vacuous. AC-1 and AC-2 use-tname filters, so exec must name the tests exactlyupdate refuses on a skills-only installandupdate --dry-run refuses on a skills-only install(AC-3: describe/test name containingupdate on a full install). A name mismatch makes-treport 0 tests, not a failure, so the ≥ 1 passed clause matters.Scope Assessment
Non-Goals: present (no
update --only, no plain-syncchange, no scope inference, nothing underplugin/,.claude/skills/,templates/skills/).src/commands,src/lib,docs, root CHANGELOG)Verdict: ✅ SCOPE_OK
Acceptance Criteria
AC-1:
updaterefuses on a skills-only install (--yes,--force)Verification: Integration Test
Scenario: Given a manifest with
groups: ["skills"]→ WhenupdateCommand({yes:true})and({force:true})→ Then no file changes (.mcp.jsonpin included), manifest byte-identical,process.exitCode≠ 0, output containssync --only skills.Assumptions: the check must run before every write in
updateCommand. Today the first writes happen before template computation:saveConfig(config setup, ~l.125-175) andsyncSequantMcpPin(l.186). The guard goes directly after the!manifestcheck (l.80-87).AC-2:
update --dry-runrefuses tooVerification: Integration Test
Scenario: Given the same manifest → When
updateCommand({dryRun:true})→ Then same message, no writes, non-zero exit code.AC-3: full install unchanged
Verification: Integration Test (existing suites + one new case)
Scenario: Given a manifest without
groups→ Whenupdate→ Then all new/modified files applied, nogroupsfield written.AC-4: docs
Verification: Manual Test (grep commands in the AC)
Scenario: Given the docs → When the two greps run → Then ≥ 1 and 0.
Implementation Plan
Phase 1: Guard (src/commands/update.ts)
!manifestreturn, callgetInstallScope(manifest). Ifkind === "partial": print the refusal (what the scope is, whyupdatewould widen it, the commandsequant sync --only skills), setprocess.exitCode = 1,return. Applies to all flag combinations, so there are no per-flag branches.updateManifest({ full: true })(~l.372). That call now runs only on full installs, so it is a no-op forgroups. Keep it unless exec finds it dead. Do not touchsrc/lib/manifest.tsunless needed (getInstallScopestays the single reader).Phase 2: Tests
sync.install-scope.integration.test.ts, replacean update on a skills-only install records a full install(l.241) withupdate refuses on a skills-only install. Cases:--yes,--force. Snapshot the file tree plus the manifest bytes and.mcp.jsonbefore and after, and assertexitCodeand the message.update --dry-run refuses on a skills-only install, andupdate on a full install(nogroups, files applied, nogroupswritten).update.test.ts(mocksgetManifest; a mock withoutgroupsreads as full, so it should stay green).Phase 3: Docs
update(no--only) installs every group, so it removes the field too" and the Decision line ("a full sync orupdateremoves the field") with: on a partial scopeupdaterefuses and points tosync --only skills; only a full install is rewritten byupdate. Add a dated amendment note, since an ADR is a record.docs/getting-started/installation.mdUpdating section: add a note for skills-only installs. It must contain the literalsync --only skills.[Unreleased]: a### Changedentry (feat(update): respect the manifest's install scope — update on a skills-only install installs hooks, agents and settings.json #1482).Design Review
updateCommand, readinggetInstallScope(the one reader). It is a refusal, not a filter.update's manifest scope write has been fixed twice (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, fix(#1409): update records a full install in the manifest #1477), so the class is "commands that write templates over a scoped install". The issue records this asdeliberately localtoupdate; plainsyncwidening is node A of graph-2026-10-freeze-c. That satisfies the stop rule.update→ delegate tosync --only?" That is hidden behaviour. A refusal is explicit, andsync --only skillsalready upgrades (verified by the owner).groupsartifact: producers areinit --manifest-only([]),sync --only(adds), fullsyncandupdate(remove). Consumers read throughgetInstallScope(drift check, status). After this changeupdatestops being a producer on partial scopes. Plainsyncstays out of scope (node A). Remedy text elsewhere that says "or update" is also node A, so I did not touch it. I did not complete the whole-repo grep for remedy strings; exec should list them in the PR as follow-up for node A.No ADR is required: the decision is already in the issue and ADR-0015 is amended in place.
Feature Quality Planning
All standard checks pass. Notable items:
groups: [](init --manifest-onlybefore any sync) is also partial, soupdaterefuses. The message must still namesync --only skills. Add this as a case in the AC-1 test.groups(non-array) reads as full viagetInstallScope, which is the owner's ruling.Mutation-verified: AC-1 — ...in the PR body with the file path first.plugin/,.claude/skills/,templates/skills/.Open Questions
console.logplusexitCode = 1. Recommendation: match it, or useconsole.erroras at l.61. Impact: only tests that assert on captured output.Recommended Workflow
Phases: exec → qa
Quality Loop: disabled
Reasoning: small, mechanical, one early return plus tests and docs. No UI, no security surface. Testgen is not needed because the ACs name concrete tests and exec writes them with the change. Run only the targeted test files in exec, not the full suite.
Label Review
Current: enhancement, graph-2026-10-freeze-c
Recommended: same, plus
plannedQuality Loop: won't auto-enable
admarble commentedon Oct 17, 2026
QA Verdict: AC_MET_BUT_NOT_A_PLUS
AC coverage: 4/4 met
Gaps:
.mcp.jsonpart of AC-1 is never tested. The fixture has no.mcp.json, sosyncSequantMcpPinreturnsno-fileeither way. The comment atsync.install-scope.integration.test.ts:241("Every file plus the.mcp.jsonpin") claims more than the test checks. The code order guarantees the pin isn't written, but no test would catch a later reordering.SEQUANT_MUTATIONmarker for AC-1. AC-1 counts as a gate-test AC (isGateTestEvidence→ true). This is the issue that sets the verdict.Suggestions:
getInstallScopethat copies the real logic. UsingimportActualwould keep them from drifting apart. This is minor.test(#1482): give the update refusal tests a stale .mcp.json pin so a…
test(#1482): give the unmanaged-skill update mock getInstallScope
feat(#1482): update refuses on a partial install scope and names sync…