Skip to content

feat: Layered configuration system with user-level customization #27

Closed

Description

@admarble

Summary

Implement a layered configuration system that allows users to customize sequant behavior at multiple levels, similar to Git, npm, and Claude Code.

Motivation

Currently, sequant settings are either hardcoded or passed via CLI flags. Users may want to:

  • Set default preferences that persist across runs
  • Create custom skills that override or extend package defaults
  • Share personal workflow customizations across projects
  • Have project-specific settings that differ from their user defaults

Proposed Architecture

Configuration Hierarchy (lowest to highest priority)

Package defaults (node_modules/sequant/templates/)
    ↓ overridden by
User-level (~/.sequant/ or ~/.config/sequant/)
    ↓ overridden by
Project-level (.sequant/)
    ↓ overridden by
CLI flags

Directory Structure

User-level (~/.sequant/ or ~/.config/sequant/):

~/.sequant/
├── settings.json          # User default settings
├── skills/                 # Custom user skills
│   └── my-custom-qa/
│       └── SKILL.md
└── stacks/                 # Custom stack templates (future)

Project-level (.sequant/):

.sequant/
├── settings.json          # Project-specific settings
├── skills/                 # Project skill overrides (symlinked from .claude/skills/)
└── logs/                   # Run logs

Settings Schema

{
  "$schema": "https://sequant.dev/schemas/settings.json",
  "version": "1.0",
  "run": {
    "logJson": true,
    "logPath": ".sequant/logs",
    "phases": ["spec", "exec", "qa"],
    "timeout": 300,
    "sequential": false,
    "qualityLoop": false,
    "maxIterations": 3,
    "smartTests": true
  },
  "skills": {
    "overrides": {
      "qa": "~/.sequant/skills/my-custom-qa"
    }
  }
}

Skill Resolution Order

When invoking /qa:

  1. Check project .sequant/skills/qa/ (or .claude/skills/qa/)
  2. Check user ~/.sequant/skills/qa/
  3. Fall back to package templates/skills/qa/

CLI Integration

  • sequant config - View merged configuration
  • sequant config --user - View/edit user settings
  • sequant config --project - View/edit project settings
  • sequant config set run.logJson false - Set a value
  • sequant config get run.timeout - Get a value

Implementation Phases

Phase 1: Project Settings (This PR)

  • Create .sequant/settings.json schema
  • Update init to generate settings file
  • Update update to preserve settings file
  • Update run to read settings
  • Add --no-log flag (override for logJson: true default)

Phase 2: User-Level Settings

  • Support ~/.sequant/settings.json
  • Merge user + project settings
  • Add sequant config command

Phase 3: Custom Skills

  • Support user-level skills directory
  • Skill resolution with override order
  • sequant skills list to show active skills and sources

Phase 4: Config Command

  • sequant config for viewing/editing
  • JSON schema validation
  • Migration support for schema changes

Alternatives Considered

  1. Environment variables only - Less discoverable, harder to manage
  2. Single config file - No layering, can't have user defaults
  3. YAML format - JSON is simpler and matches package.json conventions

Related

  • Similar to Claude Code's .claude/settings.json
  • Similar to npm's .npmrc layering
  • Similar to Git's config hierarchy

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions