Skip to content

fix(adopt): missing-skills remedies contradict each other, and the README plugin path omits the skills that runs need #1201

Closed

Description

@admarble

Epic: field-2026-09-28 (downstream non-Node adoption) Blocked by: #1193 Tier: mechanical Graph: tracker #1203

Narrowed on 2026-09-28 to the two contradictions every user hits. The product-direction half moved to #1209 (decided: the manifest stays required; init --manifest-only and sync --only skills are added). AC-3, the plugin-user fix, was added on 2026-09-28 per that decision.

Problem.

  • The two remedies contradict each other.
    • When skills are missing, the skills pre-flight says "run sequant sync" (skills-preflight.ts:239-241), without saying that sync also rewrites tracked hooks, settings.json, scripts/dev and sequant-owned AGENTS.md.
    • The run-level message says "commit .claude/skills" (run-orchestrator.ts:1199-1235).
  • The README's plugin path doesn't deliver. The plugin section (README.md:44-48) says no npm is needed and to use /sequant:setup. That skill writes a manifest but no .claude/skills/, and runs need project-scope skills (feat(run): pre-flight the skills install — missing .claude/skills/ should fail fast, not flail for 30 minutes as a spec retry #813). A plugin-only user reaches sequant run and fails pre-flight.

AC

  • AC-1: The skills pre-flight and the run-orchestrator print one consistent remedy for missing skills, and it names the tracked files sequant sync will rewrite. Evidence: npx vitest run src/lib/workflow/skills-preflight.test.ts
  • AC-2: The README plugin-install section states that .claude/skills/{spec,exec,qa} must exist and be committed for sequant run, and how to get them. Evidence: grep -n "skills/{spec,exec,qa}" README.md (matches 0 lines on main today; README:59 already mentions .claude/skills/, so a bare .claude/skills grep would pass without any change)
  • AC-3: /sequant:setup copies the phase skills (spec, exec, qa) from the installed plugin into .claude/skills/ and tells the user to commit them, in all three setup-skill copies. Evidence: grep -n ".claude/skills/spec" skills/setup/SKILL.md .claude/skills/setup/SKILL.md templates/skills/setup/SKILL.md

Related: #813, #1090, #988, #990, #1209.

Graph metadata

May touch

  • src/lib/workflow/skills-preflight.ts
  • src/lib/workflow/run-orchestrator.ts
  • README.md
  • .claude/skills/setup/SKILL.md
  • skills/setup/SKILL.md
  • templates/skills/setup/SKILL.md

File overlap (don't run in the same wave; merge one first):

Activity

  1. added
    enhancement
    cli
    graph-2026-09-field
    on Sep 28, 2026
  2. changed the title [-]feat(adopt): a minimal adoption path — run without a full init, a skills-only remedy, and an honest README plugin path[/-] [+]fix(adopt): missing-skills remedies contradict each other, and the README plugin path omits the skills that runs need[/+] on Sep 28, 2026
  3. admarble commented on Sep 29, 2026

    @admarble
    ContributorAuthor

    Context for wave 2 (graph-run #1203) — the blocker #1193 is merged (PR #1211), and it rewrote both remedy sites. On current main the skills pre-flight remedy ("run sequant sync to install them") is at skills-preflight.ts:284, and the run-level "commit .claude/skills" messages are at run-orchestrator.ts:1293 and :1330. Read ADR docs/adr/0002-spec-stays-in-main-checkout.md (new in #1211) before you change pre-flight wording, because the remedy must stay consistent with it.

    Launch constraints (read before starting) — all phases, including the qa phase:

    • The exec and qa phases must NOT run the full npm test. Every MCP phase has a hard 30-minute wall, and wave-1 exec phases ran 25–29 min. Run only the AC Evidence commands and the test files next to the code you change, in the foreground with timeout. CI runs the full suite.
    • Commit WIP early and often (at least every ~10 minutes). Committed work survives a phase timeout; uncommitted work does not.
    • Mutation markers: the failedTest field in <!-- SEQUANT_MUTATION: … --> must start with the test file path (src/…/x.test.ts > describe > case). A describe name or bare test title there floors /qa §6i to AC_NOT_MET.
    • Tracker reference: refer to the graph tracker as Refs #1203 or "tracker tracker(graph): field report 2026-09-28 — downstream non-Node adoption gaps (10 nodes) #1203". Never put a closing verb (Fixes/Closes/Resolves) next to tracker(graph): field report 2026-09-28 — downstream non-Node adoption gaps (10 nodes) #1203 anywhere in the PR body, tables included. The PR should close only this issue.
  4. added a commit that references this issue on Sep 29, 2026
  5. admarble commented on Sep 29, 2026

    @admarble
    ContributorAuthor

    Complexity: Standard (3 ACs, 5 directories)

    AC Quality Check

    • AC-1's Evidence command is currently vacuous. npx vitest run src/lib/workflow/skills-preflight.test.ts already passes on main today (30/30, verified) with no code change — the AC needs a new test case in that file asserting the unified remedy text (naming the tracked files sequant sync rewrites) before the command gates anything. Add it as part of the fix, scoped to the new assertion, and it must fail before the fix and pass after.
    • AC-2 and AC-3's Evidence commands were pre-verified against main: both grep for .claude/skills/{spec,exec,qa} (README) and .claude/skills/spec (all 3 setup copies) return 0 matches today, so they're non-vacuous as written.
    • No ## Non-Goals section in the issue body — scope assessment below has no explicit boundary to read.

    Scope Assessment

    Non-Goals: ⚠️ Not found in issue body.

    Metric Value Status
    Feature count 3 (remedy unification, README doc, setup copy step) ✅
    AC items 3 ✅
    Directory spread 5 (src/lib/workflow, root, .claude/skills/setup, skills/setup, templates/skills/setup) ⚠️

    Verdict: ⚠️ SCOPE_WARNING — directory spread is inflated by the mandatory 3-way skill mirror (one logical change, three tracked copies per reference_skill_authoring_pitfalls.md), not genuine scope creep. Issue's own **Tier:** mechanical label supports treating this as Standard, not Complex. No split recommended.


    Acceptance Criteria

    AC-1: One consistent missing-skills remedy, naming what sequant sync rewrites

    Verification: Unit Test
    Scenario: Given a checkout/worktree missing .claude/skills/{spec,exec,qa} → When runSkillsPreflight (main-checkout, non-stale case) and run-orchestrator's worktree-missing-skills path (run-orchestrator.ts:1293, :1330) each produce a message → Then both read as the same remedy and that remedy names sequant sync's full rewrite set: hooks, .claude/settings.json, scripts/dev, and sequant-owned AGENTS.md (confirmed in src/commands/sync.ts — force: true on the "managed skills/agents/hooks trees", plus conditional AGENTS.md regeneration).
    Assumptions: Targets the missing-skills remedy path only. Does not touch the separate ADR-0002 stale-main-checkout remedy (run-orchestrator.ts:1166), which is intentionally different (sync doesn't fix staleness).

    AC-2: README plugin-install section documents the skills requirement

    Verification: Manual Test (content check — automatable via the AC's own grep)
    Scenario: Given a plugin-only user reads the "Inside Claude Code (plugin)" section (README.md:44-48) → When they finish /plugin install + /sequant:setup → Then the README already told them .claude/skills/{spec,exec,qa} must exist and be committed before sequant run works, and how to get them (points at AC-3's new setup step, or sequant sync).
    Assumptions: This is documentation only; no runtime behavior changes.

    AC-3: /sequant:setup copies the phase skills into .claude/skills/

    Verification: Manual Test (grep evidence + a dry-run of /sequant:setup in a scratch project)
    Scenario: Given a plugin user with no npm install → When /sequant:setup runs → Then it copies ${CLAUDE_PLUGIN_ROOT}/skills/{spec,exec,qa} (recursively — skills/qa has references/ and scripts/ subdirs) into .claude/skills/{spec,exec,qa}, tells the user to commit them, and this is present identically in all three mirrored copies (.claude/skills/setup/SKILL.md, skills/setup/SKILL.md, templates/skills/setup/SKILL.md — confirmed byte-identical today, 408 lines each).
    Assumptions: Mirrors the existing "Copy Constitution Template" step (step 8, cp "${CLAUDE_PLUGIN_ROOT:-./templates}/memory/constitution.md" ...) already in the same file — same pattern, new step.


    Implementation Plan

    Phase 1: Unify the missing-skills remedy (AC-1)

    1. In src/lib/workflow/skills-preflight.ts (~line 284), extend the remedy string to name the full sequant sync rewrite set (hooks, .claude/settings.json, scripts/dev, AGENTS.md), not just "install them."
    2. In src/lib/workflow/run-orchestrator.ts, thread preflight.remedy into the two worktree-missing-skills messages (~1293, ~1330) instead of the ad hoc "commit .claude/skills" strings currently built independently — today run-orchestrator.ts reads preflight.cause but never preflight.remedy (verified by grep), which is exactly how the two sites drifted. Leave the ADR-0002 stale-checkout message (~1166) untouched — different failure mode.
    3. Add the new failing-until-fixed test case to skills-preflight.test.ts per the AC Quality Check note above.

    Phase 2: Document the plugin path's skills requirement (AC-2)

    1. Add a short paragraph to README.md's plugin-install section (~44-48) stating .claude/skills/{spec,exec,qa} must exist and be committed, and pointing at /sequant:setup (post-Phase-3) or sequant sync.

    Phase 3: /sequant:setup copies phase skills (AC-3)

    1. Add a new step to all three setup/SKILL.md copies (alongside existing step 8) that recursively copies ${CLAUDE_PLUGIN_ROOT:-./templates}/skills/{spec,exec,qa} into .claude/skills/{spec,exec,qa} and tells the user to commit them.
    2. Update the "What was configured" summary table in all three copies to list the copied skills.

    Design Review

    1. Where does this logic belong? Remedy text stays owned by skills-preflight.ts (already computes it) and run-orchestrator.ts (already prints it) — no new module. README and setup-skill changes are pure documentation/skill-authoring, no code layer involved.
    2. What's the simplest correct approach? Thread the existing preflight.remedy field through to the orchestrator's messages rather than hand-writing prose at each call site — that duplication is the literal root cause of the contradiction this issue reports, so the fix should close the path that let them diverge, not just make today's wording match by hand (which would drift again next time either file is touched alone).
    3. What existing pattern does this follow? AC-3 mirrors the setup skill's existing "copy a template file from the plugin root into the project" step (constitution copy, step 8) — same cp/CLAUDE_PLUGIN_ROOT pattern, just recursive and for three directories instead of one file.
    4. What would a senior reviewer challenge? "Why not a shared remedy-string constant?" — skills-preflight.ts already returns a remedy field for this; run-orchestrator.ts just never reads it. A new abstraction would solve an already-solved problem.

    Feature Quality Planning

    All standard checks pass. Notable items:


    Open Questions

    1. Should the README paragraph (AC-2) name sequant sync as a fallback for plugin users, or only the new /sequant:setup copy step (AC-3)? — Recommendation: mention both, since a plugin user who already ran /sequant:setup once (before this fix ships) still needs a remedy; sequant sync requires npm/npx though, which plugin-only users may not have. Impact if wrong: a plugin-only user with a pre-fix .claude/skills/ gap gets a remedy that assumes npm.

    Recommended Workflow

    Phases: exec → qa
    Quality Loop: disabled
    Reasoning: Mechanical, well-scoped fix (issue's own Tier: mechanical label) across 3 ACs with existing test infrastructure already in place (skills-preflight.test.ts has 30 passing tests) — a testgen phase would add ceremony for what's one new test case plus prose edits, not new test scaffolding.


    Label Review

    Current: enhancement, cli, graph-2026-09-field
    Recommended: + planned
    Reason: Plan reviewed and ready for exec; no additional labels warranted (not UI, not security-sensitive, not a breaking change).
    Quality Loop: Won't auto-enable — SCOPE_WARNING is attributable to the mandated 3-way file mirror, not genuine scope creep, and the issue is explicitly mechanical.

  6. added
    planned
    on Sep 29, 2026
  7. admarble commented on Sep 29, 2026

    @admarble
    ContributorAuthor

    QA Verdict: AC_NOT_MET

    AC coverage: 2/3 met

    Gaps:

    • AC-1 requires one consistent missing-skills remedy naming what sequant sync rewrites; the main-checkout pre-flight path still prints a divergent remedy
    • Running /setup outside a plugin install deletes the committed phase skills and the copy then fails
    • Copied phase skills have dangling _shared references in a plugin-only project
    • The drift the fix targets can recur at the orchestrator call sites without a failing test
  8. added a commit that references this issue on Sep 29, 2026
  9. admarble commented on Sep 29, 2026

    @admarble
    ContributorAuthor

    Runner follow-up (graph-run #1203) — QA verdict AC_NOT_MET. Fixed on PR #1216 @ 1deb6db5:

    Executed: npx vitest run src/lib/workflow/skills-preflight.test.ts src/lib/workflow/skills-preflight.integration.test.ts src/lib/workflow/run-orchestrator.test.ts → 40/40; AC-2/AC-3 greps match. Mutation markers in the PR body.

  10. admarble commented on Sep 29, 2026

    @admarble
    ContributorAuthor

    QA Verdict: AC_MET_BUT_NOT_A_PLUS

    AC coverage: 3/3 met

    Gaps:

    • Post-Setup commit list, summary table and README omit .claude/skills/_shared, so following them leaves ../_shared reference links dangling in worktrees
    • isolation-disabled missing-skills message no longer tells the user to re-run
    • Required test check had not completed at review time
  11. added a commit that references this issue on Sep 29, 2026
  12. admarble commented on Sep 29, 2026

    @admarble
    ContributorAuthor

    Runner follow-up, round 2 (graph-run #1203). The second QA pass returned AC_MET_BUT_NOT_A_PLUS. Fixed on PR #1216 @ 0883e6fd:

    • The setup Post-Setup list, the summary table (3 copies) and the README now name .claude/skills/_shared.
    • The isolation-disabled remedy ends with "Then re-run." again.

    Mutation-verified (marker in the PR body). npx vitest run src/lib/workflow/skills-preflight.test.ts → 31/31, and CI test = success.

  13. added a commit that references this issue on Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    clienhancementgraph-2026-09-fieldplanned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions