You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MCP server: sequant init --yes should not auto-add to all detected clients #392
In #372, sequant init --yes auto-adds Sequant MCP config to ALL detected clients (Claude Desktop, Cursor, VS Code) without asking. Users may not want Sequant added to every MCP client on their system.
Goal
--yes should either skip MCP config entirely (opt-in) or add with a visible summary rather than silently writing to all configs.
Acceptance Criteria
sequant init --yes does NOT silently add MCP config to all clients
Interactive mode still prompts per-client or as a group
sequant init --yes --mcp explicitly opts in to auto-add
sequant init --yes does NOT silently add MCP config to all clients
MET
init.ts:550-560 — addMcp defaults to false when skipPrompts is true; only set to true when options.mcp is explicitly passed. Test confirms addSequantToMcpConfig is not called with --yes alone.
AC-2
Original
Interactive mode still prompts per-client or as a group
MET
init.ts:562-571 — interactive path unchanged, inquirer.prompt still asks "Add Sequant MCP server to detected clients?". Test verifies the prompt is triggered.
AC-3
Original
sequant init --yes --mcp explicitly opts in to auto-add
MET
bin/cli.ts:109-112 registers --mcp flag; init.ts:553 checks options.mcp. Test verifies addSequantToMcpConfig called once per detected client.
Coverage: 3/3 AC items fully met
CI Status
Check
Conclusion
Impact
build (20.x)
SUCCESS
✅ MET
build (22.x)
SUCCESS
✅ MET
validate-skills
SUCCESS
✅ MET
typecheck
SUCCESS
✅ MET
validate-plugin
SUCCESS
✅ MET
CI Summary: 5 passed, 0 pending, 0 failed
Quality Metrics
Metric
Value
Status
Type issues (any)
0
OK
Deleted tests
0
OK
Files changed
4
OK
Lines added
+94
-
Lines deleted
-3
-
Test Coverage Analysis
Changed File
Tier
Has Tests?
Test File
src/commands/init.ts
Standard
✅ Yes
src/commands/init.test.ts
bin/cli.ts
Standard
✅ Yes
Covered by init.test.ts (options propagation)
CHANGELOG.md
Optional
N/A
-
Coverage: 2/2 changed source files have corresponding tests Critical paths without tests: None
Code Review
Strengths:
Clean, minimal change — only 4 files touched with a focused diff
Logic is straightforward: addMcp = false by default in non-interactive, flipped by --mcp
Good test coverage: 4 new tests covering all three AC scenarios plus non-interactive-without---mcp
Helpful user feedback: "Skipping MCP config (use --mcp to auto-add in non-interactive mode)"
CHANGELOG entry properly formatted under [Unreleased] > Fixed
Issues:
None found
Suggestions:
None — implementation is clean and focused
Test Quality Review
Category
Status
Notes
Behavior vs Implementation
✅ OK
Tests assert on observable behavior (mock call counts, console output)
Coverage Depth
✅ OK
All 3 AC paths + non-interactive edge case covered
Mock Hygiene
✅ OK
Only external dependencies mocked (detectMcpClients, addSequantToMcpConfig, inquirer)
Verified working: Yes — confirmed --mcp appears in init --help, traced code path from CLI registration through options.mcp to addMcp logic, verified tests assert all three AC scenarios.
Test efficacy: High — tests directly verify addSequantToMcpConfig call/no-call behavior for each mode.
Likely failure mode: If skipPrompts logic changes upstream (e.g., new flags that set it), the MCP guard would need updating. Low risk — the condition is simple and well-tested.
Verdict confidence: High — small, focused change with complete test coverage and passing CI.
Verdict: READY_FOR_MERGE
All 3 acceptance criteria are met. The implementation is clean, minimal, and well-tested. CI passes across all checks. No issues found.
Documentation
CHANGELOG entry added
N/A — No README/docs changes needed (CLI --help is self-documenting)
Next Steps
Run /docs 392 to generate feature documentation (if desired)
sequant init --yes does NOT silently add MCP config to all clients
MET
init.ts:549-560 — addMcp defaults to false when skipPrompts is true; only set to true when options.mcp is explicitly passed. Test verifies addSequantToMcpConfig is not called with --yes alone.
AC-2
Original
Interactive mode still prompts per-client or as a group
MET
init.ts:562-571 — interactive path unchanged, inquirer.prompt still asks "Add Sequant MCP server to detected clients?". Test verifies the prompt is triggered in interactive mode.
AC-3
Original
sequant init --yes --mcp explicitly opts in to auto-add
MET
bin/cli.ts:109-112 registers --mcp flag; init.ts:551 checks options.mcp. Test verifies addSequantToMcpConfig called once per detected client with correct args.
Coverage: 3/3 AC items fully met
Stale Branch Check
Check
Value
Commits behind main
2
Threshold
5
Status
⚠️ Warning
Feature branch is 2 commits behind main. Consider rebasing before merge.
CI Status
Check
State
Bucket
Impact
build (20.x)
SUCCESS
pass
✅ MET
build (22.x)
SUCCESS
pass
✅ MET
typecheck
SUCCESS
pass
✅ MET
validate-plugin
SUCCESS
pass
✅ MET
validate-skills
SUCCESS
pass
✅ MET
CI Summary: 5 passed, 0 pending, 0 failed
Quality Metrics
Metric
Value
Status
Type issues (any)
0
OK
Deleted tests
0
OK
Files changed
5
OK
Lines added
+117
-
Lines deleted
-5
-
Quality Plan Verification
N/A — No quality plan found in issue comments.
Cache Status
N/A — No caching configured for this run.
Build Verification
N/A — CI build passed on all Node versions.
Test Coverage Analysis
Changed File
Tier
Has Tests?
Test File
src/commands/init.ts
Standard
✅ Yes
src/commands/init.test.ts
bin/cli.ts
Standard
✅ Yes
Covered by init.test.ts (options propagation verified)
docs/features/mcp-server.md
Optional
N/A
Documentation
CHANGELOG.md
Optional
N/A
Metadata
Coverage: 2/2 changed source files have corresponding tests Critical paths without tests: None
Code Review
Strengths:
Clean, minimal change — only 5 files touched with a tightly focused diff (+117/-5)
Logic is straightforward: addMcp = false by default when skipPrompts is true, flipped only by --mcp
Good test coverage: 4 new tests covering all three AC scenarios plus non-interactive-without---mcp
Helpful user feedback message: "Skipping MCP config (use --mcp to auto-add in non-interactive mode)"
CHANGELOG entry properly formatted under [Unreleased] > Fixed with sub-bullets
Docs updated in docs/features/mcp-server.md with non-interactive mode section
All 3 AC paths + non-interactive without --mcp edge case covered
Mock Hygiene
✅ OK
Only external dependencies mocked (detectMcpClients, addSequantToMcpConfig, inquirer)
Test Reliability
✅ OK
Deterministic, no timing dependencies
Anti-Pattern Detection
Dependency Audit
N/A — No dependency changes
Code Patterns
No anti-patterns detected. No N+1 queries, empty catch blocks, hardcoded secrets, SQL injection, eval usage, or bind-all-interfaces patterns.
Critical Issues: 0 Warnings: 0
Call-Site Review
N/A — No new exported functions.
Execution Evidence
N/A — No executable scripts changed.
Skill Command Verification
N/A — No skill files changed.
CLI Registration Verification
N/A — No RunOptions or batch executor interface changes. The InitOptions interface was modified with mcp?: boolean, and the corresponding --mcp CLI registration was verified in bin/cli.ts:109-112.
Smoke Test
Not Required — No workflow-affecting changes (skills, scripts, CLI commands). The --mcp flag is a new option on an existing command, verified through unit tests.
✅ Valid — action verb "Fix", issue number (#392), sub-bullets
Result: CHANGELOG requirements met
Self-Evaluation
Verified working: Yes — traced code path from CLI registration (--mcp) through options.mcp to addMcp logic in init.ts. Verified the old code (let addMcp = skipPrompts) was the root cause and the new code correctly defaults to false. Tests assert all three AC scenarios.
Test efficacy: High — tests directly verify addSequantToMcpConfig call/no-call behavior for each mode. The interactive test verifies the MCP prompt is triggered.
Likely failure mode: If skipPrompts logic changes upstream (e.g., new flags that set it), the MCP guard would need updating. Low risk — the condition is simple and well-tested.
Verdict confidence: High — small, focused change with complete test coverage and passing CI.
Verdict: READY_FOR_MERGE
All 3 acceptance criteria are met. The implementation is clean, minimal (+117/-5 across 5 files), and well-tested with 4 new test cases. CI passes across all 5 checks. No issues found in code review, security scan, or anti-pattern detection.
Activity
fix(#392): sequant init --yes no longer auto-adds MCP config to all c…
admarble commentedon Mar 24, 2026
Exec Phase — Progress Update
AC Coverage
sequant init --yesdoes NOT silently add MCP configinit.ts:549-557init.ts:558-568(unchanged)sequant init --yes --mcpexplicitly opts inbin/cli.ts:109-112,init.ts:551Key Files Changed
bin/cli.ts— Added--mcpoption to init commandsrc/commands/init.ts— Modified MCP auto-add logic:--yesskips MCP config;--yes --mcpopts insrc/commands/init.test.ts— 4 new tests for MCP config behaviorCHANGELOG.md— Documented fix under[Unreleased]Quality Gates
npm run buildnpm run lintnpm testPR
🔗 #410
Quality Plan Alignment: N/A — No quality plan in issue
admarble commentedon Mar 24, 2026
QA Review for Issue #392
AC Coverage
sequant init --yesdoes NOT silently add MCP config to all clientsinit.ts:550-560—addMcpdefaults tofalsewhenskipPromptsis true; only set totruewhenoptions.mcpis explicitly passed. Test confirmsaddSequantToMcpConfigis not called with--yesalone.init.ts:562-571— interactive path unchanged,inquirer.promptstill asks "Add Sequant MCP server to detected clients?". Test verifies the prompt is triggered.sequant init --yes --mcpexplicitly opts in to auto-addbin/cli.ts:109-112registers--mcpflag;init.ts:553checksoptions.mcp. Test verifiesaddSequantToMcpConfigcalled once per detected client.Coverage: 3/3 AC items fully met
CI Status
build (20.x)build (22.x)validate-skillstypecheckvalidate-pluginCI Summary: 5 passed, 0 pending, 0 failed
Quality Metrics
any)Test Coverage Analysis
src/commands/init.tssrc/commands/init.test.tsbin/cli.tsCHANGELOG.mdCoverage: 2/2 changed source files have corresponding tests
Critical paths without tests: None
Code Review
Strengths:
addMcp = falseby default in non-interactive, flipped by--mcp--mcp[Unreleased] > FixedIssues:
Suggestions:
Test Quality Review
Anti-Pattern Detection
No anti-patterns detected. No dependency changes.
Execution Evidence
npx tsx bin/cli.ts init --help--mcpflag visible in helpnpm run buildnpm testEvidence status: Complete
CHANGELOG Verification
Result: CHANGELOG requirements met
Self-Evaluation
--mcpappears ininit --help, traced code path from CLI registration throughoptions.mcptoaddMcplogic, verified tests assert all three AC scenarios.addSequantToMcpConfigcall/no-call behavior for each mode.skipPromptslogic changes upstream (e.g., new flags that set it), the MCP guard would need updating. Low risk — the condition is simple and well-tested.Verdict: READY_FOR_MERGE
All 3 acceptance criteria are met. The implementation is clean, minimal, and well-tested. CI passes across all checks. No issues found.
Documentation
--helpis self-documenting)Next Steps
/docs 392to generate feature documentation (if desired)fix(#392): merge #395 and fix cross-PR test gaps
docs(#392, #395): update MCP server docs for init --mcp flag and per-…
admarble commentedon Mar 24, 2026
Documentation Updated
File:
docs/features/mcp-server.md(existing doc updated)Changes:
--yesskipping MCP config and--yes --mcpopt-inStatus:
✅ Documentation ready for review and merge.
fix(#392): sequant init --yes no longer auto-adds MCP config to all c…
docs(#392, #395): update MCP server docs for init --mcp flag and per-…
admarble commentedon Mar 24, 2026
QA Review for Issue #392
AC Coverage
sequant init --yesdoes NOT silently add MCP config to all clientsinit.ts:549-560—addMcpdefaults tofalsewhenskipPromptsis true; only set totruewhenoptions.mcpis explicitly passed. Test verifiesaddSequantToMcpConfigis not called with--yesalone.init.ts:562-571— interactive path unchanged,inquirer.promptstill asks "Add Sequant MCP server to detected clients?". Test verifies the prompt is triggered in interactive mode.sequant init --yes --mcpexplicitly opts in to auto-addbin/cli.ts:109-112registers--mcpflag;init.ts:551checksoptions.mcp. Test verifiesaddSequantToMcpConfigcalled once per detected client with correct args.Coverage: 3/3 AC items fully met
Stale Branch Check
Feature branch is 2 commits behind main. Consider rebasing before merge.
CI Status
build (20.x)build (22.x)typecheckvalidate-pluginvalidate-skillsCI Summary: 5 passed, 0 pending, 0 failed
Quality Metrics
any)Quality Plan Verification
N/A — No quality plan found in issue comments.
Cache Status
N/A — No caching configured for this run.
Build Verification
N/A — CI build passed on all Node versions.
Test Coverage Analysis
src/commands/init.tssrc/commands/init.test.tsbin/cli.tsinit.test.ts(options propagation verified)docs/features/mcp-server.mdCHANGELOG.mdCoverage: 2/2 changed source files have corresponding tests
Critical paths without tests: None
Code Review
Strengths:
addMcp = falseby default whenskipPromptsis true, flipped only by--mcp--mcp[Unreleased] > Fixedwith sub-bulletsdocs/features/mcp-server.mdwith non-interactive mode sectionIssues:
Suggestions:
Test Quality Review
--mcpedge case coveredAnti-Pattern Detection
Dependency Audit
N/A — No dependency changes
Code Patterns
No anti-patterns detected. No N+1 queries, empty catch blocks, hardcoded secrets, SQL injection, eval usage, or bind-all-interfaces patterns.
Critical Issues: 0
Warnings: 0
Call-Site Review
N/A — No new exported functions.
Execution Evidence
N/A — No executable scripts changed.
Skill Command Verification
N/A — No skill files changed.
CLI Registration Verification
N/A — No
RunOptionsor batch executor interface changes. TheInitOptionsinterface was modified withmcp?: boolean, and the corresponding--mcpCLI registration was verified inbin/cli.ts:109-112.Smoke Test
Not Required — No workflow-affecting changes (skills, scripts, CLI commands). The
--mcpflag is a new option on an existing command, verified through unit tests.CHANGELOG Verification
Result: CHANGELOG requirements met
Self-Evaluation
--mcp) throughoptions.mcptoaddMcplogic ininit.ts. Verified the old code (let addMcp = skipPrompts) was the root cause and the new code correctly defaults tofalse. Tests assert all three AC scenarios.addSequantToMcpConfigcall/no-call behavior for each mode. The interactive test verifies the MCP prompt is triggered.skipPromptslogic changes upstream (e.g., new flags that set it), the MCP guard would need updating. Low risk — the condition is simple and well-tested.Verdict: READY_FOR_MERGE
All 3 acceptance criteria are met. The implementation is clean, minimal (+117/-5 across 5 files), and well-tested with 4 new test cases. CI passes across all 5 checks. No issues found in code review, security scan, or anti-pattern detection.
Documentation
docs/features/mcp-server.mdupdated with non-interactive mode sectionNext Steps
fix(#392): sequant init --yes no longer auto-adds MCP config to all c…
docs(#392, #395): update MCP server docs for init --mcp flag and per-…
fix(#392): sequant init --yes should not auto-add MCP to all clients (#…
admarble commentedon Mar 24, 2026
Documentation Updated
File:
docs/features/mcp-server.md(existing doc updated in PR #410)Changes Included:
--yesskipping MCP config and--yes --mcpopt-in[Unreleased] > FixedStatus:
✅ Documentation was included in the implementation PR — no additional documentation needed.
Ready to merge! (Already merged as PR #410)