Skip to content

Add SvelteKit, Remix, and Nuxt stack detection #11

Closed

Description

@admarble

Problem

Popular meta-frameworks beyond Next.js aren't detected:

  • SvelteKit (svelte.config.js)
  • Remix (remix.config.js)
  • Nuxt (nuxt.config.ts)

These fall back to "generic" with no customized commands.

Detection Patterns

SvelteKit

  • Files: `svelte.config.js`, `svelte.config.ts`
  • Package: `@sveltejs/kit`

Remix

  • Files: `remix.config.js`, `remix.config.ts`
  • Package: `@remix-run/react`

Nuxt

  • Files: `nuxt.config.ts`, `nuxt.config.js`
  • Package: `nuxt`

Acceptance Criteria

  • Detect SvelteKit projects
  • Detect Remix projects
  • Detect Nuxt projects
  • Configure appropriate commands for each

Priority

Low - nice to have for broader framework coverage.

Activity

  1. admarble commented on Jan 8, 2026

    @admarble
    ContributorAuthor

    Implementation Note: Optimize package.json Reading

    When implementing this, consider refactoring detectStack() in src/lib/stacks.ts to read package.json only once and check all JS framework dependencies together.

    Current pattern (after Astro was added in #5):

    // Reads package.json for Next.js
    if (await fileExists("package.json")) {
      const pkg = JSON.parse(await readFile("package.json"));
      if (deps.next) return "nextjs";
    }
    // ... later reads package.json again for Astro
    if (await fileExists("package.json")) {
      const pkg = JSON.parse(await readFile("package.json"));
      if (deps.astro) return "astro";
    }

    Recommended pattern:

    // Read package.json once and check all JS framework deps
    if (await fileExists("package.json")) {
      try {
        const pkg = JSON.parse(await readFile("package.json"));
        const deps = { ...pkg.dependencies, ...pkg.devDependencies };
        if (deps.next) return "nextjs";
        if (deps.astro) return "astro";
        if (deps["@sveltejs/kit"]) return "sveltekit";
        if (deps["@remix-run/react"]) return "remix";
        if (deps.nuxt) return "nuxt";
      } catch {
        // Ignore parse errors
      }
    }

    This reduces file I/O and improves detection performance.

  2. admarble commented on Jan 9, 2026

    @admarble
    ContributorAuthor

    📋 Implementation Plan (Phase 1: /spec)

    Acceptance Criteria with Verification

    AC-1: Detect SvelteKit projects

    Verification: Unit Test

    • Given: Project with svelte.config.js/.ts OR @sveltejs/kit in package.json
    • When: detectStack() called
    • Then: Returns "sveltekit"

    AC-2: Detect Remix projects

    Verification: Unit Test

    • Given: Project with remix.config.js/.ts OR @remix-run/react in package.json
    • When: detectStack() called
    • Then: Returns "remix"

    AC-3: Detect Nuxt projects

    Verification: Unit Test

    • Given: Project with nuxt.config.ts/.js OR nuxt in package.json
    • When: detectStack() called
    • Then: Returns "nuxt"

    AC-4: Configure appropriate commands

    Verification: Unit Test

    Stack devUrl Commands
    SvelteKit http://localhost:5173 npm run build/dev/test/lint
    Remix http://localhost:5173 npm run build/dev/test/lint
    Nuxt http://localhost:3000 npm run build/dev/test/lint

    Implementation Plan

    Phase 1: Add Stack Configurations

    1. Add sveltekit config to STACKS in src/lib/stacks.ts
    2. Add remix config to STACKS
    3. Add nuxt config to STACKS

    Phase 2: Refactor detectStack() (per @admarble comment)
    4. Refactor to read package.json only once and check all JS deps together
    5. Maintain priority: Next.js > Astro > SvelteKit > Remix > Nuxt > Rust > Go > Python

    Phase 3: Add Unit Tests
    6. Add config tests for each new stack
    7. Add detection tests (file + package.json)
    8. Add priority tests


    Assumptions to Validate

    • SvelteKit uses @sveltejs/kit (not svelte) as dependency marker
    • Remix uses @remix-run/react as canonical dependency
    • Nuxt 3 uses nuxt package name
    • Default ports: SvelteKit/Remix=5173, Nuxt=3000

    Conflict Analysis

    In-flight: #6 (bun package manager) may touch stacks.ts
    Resolution: Orthogonal concerns - proceed, rebase if needed


    Recommended Workflow

    Phases: exec → qa
    Quality Loop: disabled
    Reasoning: Clear patterns exist (Astro implementation), good test coverage, no UI changes


    🤖 Generated with Claude Code via /spec

  3. admarble commented on Jan 9, 2026

    @admarble
    ContributorAuthor

    📋 Implementation Plan

    Acceptance Criteria with Verification

    AC-1: Detect SvelteKit projects ✅

    • Detection: svelte.config.js, svelte.config.ts, or @sveltejs/kit in package.json
    • Verification: Unit tests for file detection and package.json dependency detection
    • Dev URL: http://localhost:5173 (Vite-based)

    AC-2: Detect Remix projects ✅

    • Detection: remix.config.js, remix.config.ts, or @remix-run/react in package.json
    • Verification: Unit tests for file detection and package.json dependency detection
    • Dev URL: http://localhost:3000

    AC-3: Detect Nuxt projects ✅

    • Detection: nuxt.config.ts, nuxt.config.js, or nuxt in package.json
    • Verification: Unit tests for file detection and package.json dependency detection
    • Dev URL: http://localhost:3000

    AC-4: Configure appropriate commands ✅

    • All frameworks: npm test, npm run build, npm run lint, npm run dev
    • Verification: Unit tests confirming command configuration

    Implementation Steps

    Phase Task Files
    1 Add STACKS entries for sveltekit, remix, nuxt src/lib/stacks.ts
    2 Refactor detectStack() to read package.json once (per issue comment) src/lib/stacks.ts
    3 Add framework choices to interactive init src/commands/init.ts
    4 Add unit tests for detection and configuration src/lib/stacks.test.ts
    5 Run tests and lint -

    Detection Priority Order

    Next.js > Astro > SvelteKit > Remix > Nuxt > Rust > Go > Python

    Additional Note

    Also adding Astro to the init.ts choices list (currently missing despite being in STACKS).

    Effort Estimate

    • Changes: ~100 lines of code + ~80 lines of tests
    • Complexity: Low (follows existing patterns)

    Plan generated by /spec workflow

  4. added
    enhancement
    on Jan 9, 2026
  5. admarble commented on Jan 10, 2026

    @admarble
    ContributorAuthor

    📋 Implementation Plan (Phase 1: /spec)

    Acceptance Criteria with Verification

    AC-1: Detect SvelteKit projects

    Verification: Unit Test

    • Given: Project with svelte.config.js, svelte.config.ts, OR @sveltejs/kit in package.json
    • When: detectStack() called
    • Then: Returns "sveltekit"
    • Dev URL: http://localhost:5173 (Vite-based)

    AC-2: Detect Remix projects

    Verification: Unit Test

    • Given: Project with remix.config.js, remix.config.ts, OR @remix-run/react in package.json
    • When: detectStack() called
    • Then: Returns "remix"
    • Dev URL: http://localhost:5173 (Vite-based for v2+)

    AC-3: Detect Nuxt projects

    Verification: Unit Test

    • Given: Project with nuxt.config.ts, nuxt.config.js, OR nuxt in package.json
    • When: detectStack() called
    • Then: Returns "nuxt"
    • Dev URL: http://localhost:3000

    AC-4: Configure appropriate commands

    Verification: Unit Test

    Stack devUrl Commands
    SvelteKit http://localhost:5173 npm run build/dev/test/lint
    Remix http://localhost:5173 npm run build/dev/test/lint
    Nuxt http://localhost:3000 npm run build/dev/test/lint

    Implementation Plan

    Phase 1: Add Stack Configurations

    1. Add sveltekit, remix, nuxt configs to STACKS in src/lib/stacks.ts

    Phase 2: Refactor detectStack() (per owner comment)
    2. Consolidate package.json reading - read once, check all JS framework deps together
    3. Priority order: Next.js > Astro > SvelteKit > Remix > Nuxt > Rust > Go > Python

    Phase 3: Update Interactive Init
    4. Add SvelteKit, Remix, Nuxt, Astro to choices in src/commands/init.ts

    Phase 4: Add Unit Tests
    5. Add config tests for each new stack
    6. Add detection tests (file + package.json variants)
    7. Add priority tests

    Phase 5: Verification
    8. Run npm test, npm run lint, npm run build


    Conflict Analysis

    Assumptions Validated

    • SvelteKit uses @sveltejs/kit as canonical dependency
    • Remix uses @remix-run/react as canonical dependency
    • Nuxt 3 uses nuxt package name
    • Default ports: SvelteKit/Remix=5173, Nuxt=3000

    Recommended Workflow

    Phases: exec → qa
    Quality Loop: disabled
    Reasoning: Clear patterns from Astro implementation, good test coverage, no UI changes


    🤖 Generated with Claude Code via /spec

  6. added a commit that references this issue on Jan 10, 2026
  7. admarble commented on Jan 10, 2026

    @admarble
    ContributorAuthor

    🚀 Implementation Complete (Phase 2: /exec)

    AC Coverage Summary

    AC Status Notes
    AC-1: Detect SvelteKit projects ✅ Satisfied File detection (svelte.config.js/.ts) + package.json (@sveltejs/kit)
    AC-2: Detect Remix projects ✅ Satisfied File detection (remix.config.js/.ts) + package.json (@remix-run/react)
    AC-3: Detect Nuxt projects ✅ Satisfied File detection (nuxt.config.ts/.js) + package.json (nuxt)
    AC-4: Configure appropriate commands ✅ Satisfied All use npm run build/dev/test/lint with correct devUrl ports

    Files Changed

    • src/lib/stacks.ts - Added 3 new stack configs, refactored detectStack() to read package.json once
    • src/lib/stacks.test.ts - Added 35 new tests for config, detection, and priority
    • src/commands/init.ts - Added Astro, SvelteKit, Remix, Nuxt to interactive choices

    Dev URLs Configured

    Stack Dev URL
    SvelteKit http://localhost:5173 (Vite-based)
    Remix http://localhost:5173 (Vite-based)
    Nuxt http://localhost:3000

    Detection Priority Order

    Next.js > Astro > SvelteKit > Remix > Nuxt > Rust > Go > Python

    Test Results

    ✓ 188 tests passing
    ✓ Build succeeds
    

    PR Status

    Created: #45


    🤖 Generated with Claude Code via /exec

  8. admarble commented on Jan 10, 2026

    @admarble
    ContributorAuthor

    🔍 QA Review (Phase 3)

    AC Coverage

    AC Description Status Notes
    AC-1 Detect SvelteKit projects ✅ MET File detection (svelte.config.js, svelte.config.ts) + package.json (@sveltejs/kit) implemented with 4 unit tests
    AC-2 Detect Remix projects ✅ MET File detection (remix.config.js, remix.config.ts) + package.json (@remix-run/react) implemented with 4 unit tests
    AC-3 Detect Nuxt projects ✅ MET File detection (nuxt.config.ts, nuxt.config.js) + package.json (nuxt) implemented with 4 unit tests
    AC-4 Configure appropriate commands ✅ MET All stacks have npm run build/dev/test/lint commands with correct devUrls (SvelteKit/Remix: 5173, Nuxt: 3000)

    Coverage: 4/4 AC items fully met


    Quality Metrics

    Metric Value Status
    Type issues (any) 0 ✅
    Deleted tests 0 ✅
    Files changed 3 ✅
    Lines added +380 -
    Lines deleted -18 -
    Tests passing 188 ✅
    Build Success ✅

    Code Review

    Strengths:

    • Refactored as requested: detectStack() now reads package.json only once and checks all JS framework deps together (per owner comment)
    • Consistent patterns: New stack configs follow exact same structure as existing ones
    • Comprehensive tests: 35+ new tests covering config, file detection, package.json detection, and priority ordering
    • Priority order maintained: Next.js > Astro > SvelteKit > Remix > Nuxt > Rust > Go > Python
    • Init command updated: Added Astro, SvelteKit, Remix, Nuxt to interactive choices

    Issues:

    • None found

    Verdict: ✅ READY_FOR_MERGE

    The implementation fully satisfies all acceptance criteria with high code quality. All 188 tests pass and build succeeds.

    Next Steps

    1. Run /docs 11 to generate feature documentation before merging
    2. Merge PR feat(#11): Add SvelteKit, Remix, and Nuxt stack detection #45

    🤖 Generated with Claude Code via /qa

  9. added a commit that references this issue on Jan 10, 2026
  10. added a commit that references this issue on Jun 1, 2026
  11. added 2 commits that reference this issue on Sep 9, 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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions