Skip to content

refactor(config): implement project-based configuration system with setup wizards#110

Merged
finxo merged 7 commits intomasterfrom
feat/new_config_system
Jan 20, 2026
Merged

refactor(config): implement project-based configuration system with setup wizards#110
finxo merged 7 commits intomasterfrom
feat/new_config_system

Conversation

@finxo
Copy link
Collaborator

@finxo finxo commented Jan 20, 2026

Pull Request

📝 Summary

This PR fundamentally redesigns Titan's configuration architecture from a global project-root model to a project-based approach. Titan now operates on a per-project basis with dedicated setup wizards for both global AI settings and project-specific configuration. This change eliminates the need for global project_root and active_project settings, making Titan more intuitive and aligned with standard development workflows.

🔧 Changes Made

  • Configuration Architecture:

    • Removed global project_root and active_project from [core] configuration
    • Implemented two-level config: global (~/.titan/config.toml) for AI providers, project-local (./.titan/config.toml) for project settings
    • Titan must now be run from within a project directory (uses cwd as project root)
    • Project configs include project name, enabled plugins, and plugin-specific settings
  • Setup Wizards:

    • Global Setup Wizard: Runs on first launch, guides AI provider configuration, creates ~/.titan/config.toml
    • Project Setup Wizard: Runs in unconfigured directories, detects project type, handles project naming and plugin selection
    • Both wizards use Textual TUI with welcome screens, selection lists, and dedicated flow screens
  • TUI Improvements:

    • Refactored wizard flow with improved state management and config refresh logic
    • Implemented SelectionList widget for plugin selection with enable/disable toggles
    • Streamlined initial setup by enforcing AI configuration before project setup
    • Enhanced project wizard with dedicated flow screen and better UX
  • Workflow Filtering:

    • Workflows now filtered based on enabled project plugins
    • Only workflows whose plugin dependencies are enabled in the current project are shown
  • Plugin Updates:

    • Updated Git plugin to remove protected_branches from client initialization
    • Updated Jira plugin to use get_project_name() instead of deprecated get_active_project()
  • Documentation:

    • Updated CLAUDE.md with new architecture details, migration notes, and usage examples
    • Added comprehensive setup wizard documentation
    • Documented the two-level configuration system with examples

🧪 Testing

  • Manual testing performed
  • Global setup wizard tested on fresh install
  • Project setup wizard tested in unconfigured directories
  • Configuration loading verified for both global and project configs
  • Workflow filtering validated with various plugin combinations
  • Legacy Rich-based menu confirmed to still function
  • Unit tests added/updated (existing tests need updates for new architecture)
  • Integration tests added/updated

✅ Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Note: This is a breaking change for existing users. Old configurations will load but [core] settings are ignored. The legacy titan menu command uses old architecture; new titan command uses project-based approach.

@finxo finxo requested a review from a team January 20, 2026 14:40
@finxo finxo self-assigned this Jan 20, 2026
@finxo finxo merged commit c283d38 into master Jan 20, 2026
1 check passed
@finxo finxo deleted the feat/new_config_system branch January 20, 2026 15:53
r-pedraza added a commit that referenced this pull request Jan 22, 2026
Adapt documentation to reflect Titan's new project-based architecture:

**Prerequisites Section**:
- Add clear explanation that Titan MUST run from project directory
- Document removed global project_root and active_project settings
- Explain new Path.cwd() behavior

**How It Works Section**:
- Add visual diagram showing file locations and config loading
- Show separation between global config (AI only) and project config (plugins)
- Clarify that workflows live in project, not in titan-cli

**Key Changes**:
- Global config (~/.titan/config.toml): Only AI provider settings
- Project config (./.titan/config.toml): Plugins, JIRA, GitHub settings
- Workflows: Must be in project's .titan/workflows/ directory
- Execution: Must run from project directory (cd ragnarok-ios && titan run)

Fixes compatibility with master after merge of PR #110.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant