Repository navigation
Description
Found during graph-2026-10-freeze-c planning (Phase 0 of node A); not a graph node.
It lands after freeze-c node A, which edits the same file (doctor.ts) and test file and adds the first install-scope read to doctor.
Problem
doctor's AGENTS.md check (src/commands/doctor.ts:678-686) warns whenever a manifest exists and AGENTS.md is absent. The message names sequant init --force. It does not read the install scope (getInstallScope, src/lib/manifest.ts:74).
An install made with init --manifest-only + sync --only skills (groups: ["skills"]) never writes AGENTS.md. So doctor warns on every such install, and the fix it names widens the install.
Reproduced 2026-10-17 (main @ de03af8, dev CLI, temp git repo with a package.json):
sequant init --manifest-only --yes, thensequant sync --only skills. The manifest reads{"version":"2.19.0","groups":["skills"]}..claude/holds onlyskills/.sequant doctorprinted:! AGENTS.md: Missing AGENTS.md - run: sequant init --force (sync never creates a missing AGENTS.md)- On a copy, with a hand-written
.claude/memory/constitution.mdcommitted,sequant init --force --yeswrote.claude/agents/,.claude/hooks/,.claude/settings.json,.mcp.json,.gitignore,scripts/,AGENTS.md. It changed two skill files and removedgroupsfrom the manifest ("groups": nullviajq). The constitution was kept.
So the remedy turns a skills-only install into a full install, the outcome #1409 and #1482 exist to prevent.
Acceptance Criteria
- AC-1: On a manifest with
groups: ["skills"]and noAGENTS.md,doctor's AGENTS.md check is not a warning and names no command. Its message saysAGENTS.mdis outside the skills-only install. Evidence:npx vitest run src/commands/doctor.test.ts -t "missing AGENTS.md on a skills-only install"reports ≥ 1 passed, 0 failed, mutation-verified by restoring the unconditionalinit --forcewarning. - AC-2: On a manifest without
groups(a full install) and noAGENTS.md, the check keeps today's warning and itsinit --forceremedy. Evidence:npx vitest run src/commands/doctor.test.ts -t "missing AGENTS.md on a full install"reports ≥ 1 passed, 0 failed. - AC-3: On a manifest with
groups: ["skills"], a presentAGENTS.mdgets today's result: pass when sequant-owned, the fix(sync): never rewrite a user-owned AGENTS.md or write a machine-specific scripts/dev symlink (absorbs #991) #990 user-owned warning otherwise. Evidence:npx vitest run src/commands/doctor.test.ts -t "existing AGENTS.md on a skills-only install"reports ≥ 1 passed, 0 failed, andnpx vitest run src/commands/doctor.test.ts -t "990 AC-7"reports 0 failed.
Prior fixes / producers
-
Prior fixes:
git log -S 'init --force' -- src/commands/doctor.tsreturns one commit: 3bdfbf1 (2026-03-21, Generate and consume AGENTS.md for cross-tool compatibility #371, PR feat(#371): generate and consume AGENTS.md for cross-tool compatibility #374), which added the check. fix(sync): never rewrite a user-owned AGENTS.md or write a machine-specific scripts/dev symlink (absorbs #991) #990 (ownership of a presentAGENTS.md) left the missing-file path unchanged. 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) added the install scope after this check, and nothing scoped it. No earlier issue covers this. Searchedgh issue list --state allfor "doctor AGENTS.md init --force" and "skills-only doctor". -
Producers of
init --forceadvice (git grep -n "init --force" -- 'src/*.ts' ':!*.test.ts'):src/commands/doctor.ts:684: this check.src/commands/init.ts:1192:inititself, for a user-ownedAGENTS.md. That runs only insideinit, so it does not apply to a skills-only install.
Deliberately local: one producer, one reader of the scope (
getInstallScope).
May touch
src/commands/doctor.ts (the AGENTS.md check), src/commands/doctor.test.ts, CHANGELOG.md.
Non-Goals
- The Hooks and Settings checks (
doctor.ts:688-702,:736-749). They also warn on a skills-only install (No hooks directory (optional but recommended),No settings.json (hooks won't be triggered)), but they name no command, so they don't widen the install. File separately if wanted. - The Skills Version remedy and the old-style manifest advice (freeze-c node A).
- A way to create only
AGENTS.mdon a skills-only install. - Any edit under
plugin/,.claude/skills/ortemplates/skills/(plugin freeze). - A release.
Activity
admarble commentedon Oct 18, 2026
Complexity: Simple (3 ACs, 1 directory)
AC Quality Check
All three ACs are one line with a command-shaped
Evidence:. Each-tfilter matches no test today, so each fails on the base branch and can pass only once the tests are written. That makes them non-vacuous. AC-1 and AC-2 need exact test titles:missing AGENTS.md on a skills-only installandmissing AGENTS.md on a full install. AC-3 also needsexisting AGENTS.md on a skills-only install. Note that vitest-twith no match exits 0 or 1 depending onpassWithNoTests. Read "≥ 1 passed" literally.Scope Assessment
Non-Goals: present (Hooks and Settings checks, Skills Version remedy, an AGENTS.md-only creator, plugin/skills dirs, release).
src/commands)Verdict: ✅ SCOPE_OK
Acceptance Criteria
AC-1: skills-only, AGENTS.md missing
Verification: Unit Test (
doctor.test.ts)Scenario: Given manifest
groups:["skills"],readAgentsMdreturns null → WhendoctorCommand()runs → Then the AGENTS.md check is notwarn, it names noinit --force, and the message says AGENTS.md is outside the skills-only install.AC-2: full install, AGENTS.md missing
Verification: Unit Test
Scenario: Given a manifest without
groupsand no AGENTS.md → Then today's warning with theinit --forceremedy is kept.AC-3: skills-only, AGENTS.md present
Verification: Unit Test
Scenario: Given
groups:["skills"]and AGENTS.md present → Then pass when sequant-owned, the #990 user-owned warning otherwise. The existing "990 AC-7" tests stay green.Implementation Plan
Phase 1: doctor check
src/commands/doctor.ts~line 717: split theelse if (manifest)branch ongetInstallScope(manifest).kind.partial: push{name:"AGENTS.md", status:"pass", message:"Not part of the skills-only install (AGENTS.md is outside this install scope)"}. It must not bewarn, and the message must carry no command.full: keep the current warning.getInstallScopefrom../lib/manifest.js(line 20).Phase 2: tests
doctor.test.ts: thevi.mock("../lib/manifest.js")factory (line 36) only providesgetManifestandgetPackageVersion. AddgetInstallScopeto the mock. Prefer a real-behaviour stub (m.groupsarray → partial) so the tests exercise the actual branching. Otherwise the call is undefined and every doctor test throws.CHANGELOG.mdentry.Mutation-verified: AC-1 — <mutation>; src/commands/doctor.test.ts > ... failed; restored.in the PR body, with the path as the first segment.Design Review
doctor.ts.getInstallScopeis the single reader of scope.scope.kind. Rejected: checking whether.claude/hooksetc. exist (heuristic, fix(sync): plain sync and doctor still steer a skills-only install into a full install — sync ignores the recorded scope, doctor names bare sync #1485 already handled legacy manifests that way); rejected: silencing the check entirely, because a full install should still be warned.git log -S 'init --force' -- src/commands/doctor.tsfinds only 3bdfbf1 (Generate and consume AGENTS.md for cross-tool compatibility #371). The issue records that there is one producer, so it is deliberately local. The scope-ignoring class is already tracked in fix(sync): a --only skills install warns 'N file(s) differ' forever, and the suggested sync --force overwrites the repo's constitution #1409/feat(update): respect the manifest's install scope — update on a skills-only install installs hooks, agents and settings.json #1482/fix(sync): plain sync and doctor still steer a skills-only install into a full install — sync ignores the recorded scope, doctor names bare sync #1485.passrather than omitting the check?" Answer: the AC requires a message saying AGENTS.md is outside the install. "Why does apartialscope with other groups also skip?" TodayInstallGroupis only"skills". If groups ever add an AGENTS.md group, revisit it. Consider gating on!groups.includes(...)only then.Feature Quality Planning
All standard checks pass. Notables:
doctor.tsand its test (Skills Version remedy), so expect a trivial merge conflict, and merge main before QA.Open Questions
pass(the AC says "not a warning"). Impact: cosmetic only.Recommended Workflow
Phases: exec → qa
Quality Loop: disabled
Reasoning: Single-file bug fix with
buglabel and three unit-test ACs. Declared evidence isvitestunit tests, but the bug-only label rule skips testgen.Label Review
Current: bug. Recommended: bug, no change. Quality Loop: won't auto-enable.
→
gh issue edit 1489 --add-label plannedadmarble commentedon Oct 18, 2026
QA Verdict: AC_MET_BUT_NOT_A_PLUS
AC coverage: 3/3 met
Gaps:
Suggestions:
groups: [](init --manifest-onlybefore anysync --only) also reads as partial. It gets the message "Not part of the skills-only install", but nothing is installed yet. The behavior is correct. The wording could be scope-neutral.formatSkillsOutdatedMessage(...)re-wrap atdoctor.ts:668is a Prettier-only change that this issue did not need. It is harmless.fix(#1489): a skills-only install is told to run `init --force` for a…